summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avfilter/vf_alphamere: use the name 's' for the pointer to the private contextPaul B Mahol2019-10-01
| | | | This is shorter and consistent across filters.
* avcodec/dxv: Check op_offset in dxv_decompress_yo()Michael Niedermayer2019-09-30
| | | | | | | | | Fixes: signed integer overflow: -2147483648 - 8 cannot be represented in type 'int' Fixes: 17745/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_fuzzer-5734628463214592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/utils: Check sample_rate before opening the decoderMichael Niedermayer2019-09-30
| | | | | | | | | | | | | Fixes: signed integer overflow: 2 * -1306460384 cannot be represented in type 'int' Fixes: 17685/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_fuzzer-5747390337777664 Fixes: 17688/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5739287210885120 Fixes: 17699/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5678394531905536 Fixes: 17738/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5763415733174272 Fixes: 17746/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINKAUDIO_RDFT_fuzzer-5703008159006720 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aptx: Fix multiple shift anomaliesMichael Niedermayer2019-09-30
| | | | | | | | | Fixes: left shift of negative value -24576 Fixes: 17719/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APTX_fuzzer-5710508002377728 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_photosensitivity: fix memleakPaul B Mahol2019-09-30
|
* libavfilter: add photosensitivity filterVladimir Panteleev2019-09-30
|
* avfilter: add scroll video filterPaul B Mahol2019-09-30
|
* avfilter/af_join: cosmeticsPaul B Mahol2019-09-30
|
* avfilter/af_join: use av_asprintf()Paul B Mahol2019-09-30
|
* avfilter/split: use av_asprintf()Paul B Mahol2019-09-30
|
* avfilter/trim: drop all audio frames instead of assertingPaul B Mahol2019-09-30
|
* avfilter/f_metadata: do not memleak exprPaul B Mahol2019-09-30
|
* avfilter/f_metadata: add ends_with() function for comparing ends of stringsPaul B Mahol2019-09-30
|
* lavf/utils: support duration estimate method dumpJun Zhao2019-09-30
| | | | | | | | add new function duration_estimate_name to dump duration estimate method, it's will help to debug some duration issue. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/utils: Cosmetics: fix indentation for estimate_timingsJun Zhao2019-09-30
| | | | | | fix indentation for estimate_timings when dump start_time/duartion. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/utils: correct the duration estimation method for nut demuxerJun Zhao2019-09-30
| | | | | | in fact, nut demuxer use the PTS for duration estimation. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/nutdec: add logging context to logJun Zhao2019-09-30
| | | | | | | | Add logging context to log, it's will help debuging. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/utils: change the log level to warning if can't get durationJun Zhao2019-09-30
| | | | | | | | change the log level to warning if can't get duration, it's will help to debug some duration issue Signed-off-by: vacingfang <vacingfang@tencent.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* tools/target_dec_fuzzer: Adjust VP7 thresholdMichael Niedermayer2019-09-29
| | | | | | | | | Fixes: Timeout (110sec -> 10sec) Fixes: 17705/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5765834135306240 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qtrleenc: fix undefined behaviourPaul B Mahol2019-09-29
| | | | Fixes #7991.
* doc/examples/muxing: fix underflow in duration of encoded streamsPaul B Mahol2019-09-29
| | | | | | Now they are exactly 10 seconds long. Fixes #5684.
* avcodec/cbs_av1: Make overread check more robustAndreas Rheinhardt2019-09-29
| | | | | | | | | | | When performing a comparison of a signed int and an unsigned int, the signed int is first converted to an unsigned int, so that negative values are being treated as big, positive values. This can become a problem in an overread check, namely when an overread already happened. So change the type of the variable containing the amount of bits that need to be left to signed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cbs_h2645: Fix potential out-of-bounds array accessAndreas Rheinhardt2019-09-29
| | | | | | | | | | | The maximum allowed index for an array access is FF_ARRAY_ELEMS - 1; yet the current code allowed FF_ARRAY_ELEMS. This wasn't dangerous in practice, as parameter sets with invalid ids were already filtered out during reading. Found via PVS-Studio (see ticket #8156). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/fitsdec: fix use of uninitialised valuesJames Almer2019-09-29
| | | | | | | | | header.data_max and header.data_min are not necessarely set on all decoding scenarios. Fixes a Valgrind reported regression since cfa193779103c97bbfc28273a0ab12c114b6786d. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/utils: Remove unnecessary initializationsAndreas Rheinhardt2019-09-28
| | | | | | | | | | | | | | | | | | | | Up until now, read_frame_internal always initialized the packet it received. But since the recent changes to ff_read_packet, this is no longer needed: If the parsing queue is initially empty upon entering read_frame_internal, the packet will now either contain content upon success or be blank upon failure of ff_read_packet. If the parsing queue is initially not empty, the packet will be overwritten with the oldest one from the parsing queue. Similarly, it is unnecessary to initialize ret in read_frame_internal. In parse_packet, it is easily possible to only initialize the packet used as temporary storage for the output if said packet is used at all; furthermore, this packet doesn't need to be zero-initialized, because av_init_packet will initialize every field except size and data and those fields will be set by av_parser_parse2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/utils: Improve parsing packetsAndreas Rheinhardt2019-09-28
| | | | | | | | | | | | Up until now, parse_packet() used a stack packet in case the stream is flushed. But using such a packet is unnecessary as there is an AVPacket readily available, it just needs to be used. Whether flushing is intended or not will now be signalled by an explicit parameter rather than by whether the packet parameter is NULL. This removes a few checks in parse_packet(), gets rid of the initialization of the stack packet and also reduces usage of sizeof(AVPacket) in libavformat. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/utils: Avoid copying packets unnecessarilyAndreas Rheinhardt2019-09-28
| | | | | | | | | | | | | | | | | | | | | | | | Up until now, read_frame_internal in avformat/utils.c uses a spare packet on the stack that serves no real purpose: At no point in this function is there a need for another packet besides the packet destined for output: 1. If the packet doesn't need a parser, but is output as is, the content of the spare packet (that at this point contains a freshly read packet) is simply copied into the output packet (via simple assignment, not av_packet_move_ref, thereby confusing ownership). 2. If the packet needs parsing, the spare packet will be reset after parsing and any packets resulting from the packet read will be put into a packet list; the output packet is not used here at all. 3. If the stream should be discarded, the spare packet will be unreferenced; the output packet is not used here at all either. Therefore the spare packet and the copies can be removed in principle. In practice, one more thing needs to be taken care of: If ff_read_packet failed, the output packet was not affected, now it is. But given that ff_read_packet returns a blank (as if reset via av_packet_unref) packet on failure, there is no problem from this side either. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/utils: Don't create unnecessary referencesAndreas Rheinhardt2019-09-28
| | | | | | | | | When AVFMT_FLAG_GENPTS is set, av_read_frame would put a reference to a packet in the packet list (via av_packet_ref) and then immediately thereafter unreference the original packet. This has been changed to move the reference instead. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/utils: Fix memleaks IIAndreas Rheinhardt2019-09-28
| | | | | | | | | | | Up until now, avformat_find_stream_info had a potential for memleaks: When everything was fine, it read packets and (depending upon whether AVFMT_FLAG_NOBUFFER was set) put them in a packet list or unreferenced them when they were no longer needed. But upon failure, said packets would leak if they were not already on the packet list. This patch fixes this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/utils: Don't initialize in loopsAndreas Rheinhardt2019-09-28
| | | | | | | | | | | | | | | | Since the recent changes to ff_packet_list_put, the source packet will be automatically reset when the reference is moved to the packet list, so that it is unnecessary to reinitialize the packet in the loops in parse_packet and ff_read_packet; initializing once at the beginning is enough. This also fixes a potential, but currently unexisting problem: If the raw packet buffer was initially not empty and probe_codec() failed, then the packet returned would not be initialized. But given that probe_codec() currently can't fail (always returns 0) this was not an acute danger. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* doc/filters: add more advanced silenceremove examplePaul B Mahol2019-09-28
|
* avfilter/fifo: use the name 's' for the pointer to the private contextPaul B Mahol2019-09-28
| | | | This is shorter and consistent across filters.
* avfilter/fifo: cosmeticsPaul B Mahol2019-09-28
|
* avfilter/vf_framerate: remove duplicate code with macro-based functionLimin Wang2019-09-28
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/vf_framerate: refine the filter_slice code for better readiablityLimin Wang2019-09-28
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/vf_framerate: limit the scene level max rangeLimin Wang2019-09-28
| | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/motionpixels: Mark 2 functions as always_inlineMichael Niedermayer2019-09-28
| | | | | | | | Fixes: Timeout (30sec -> 25sec) Fixes: 17050/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-5719149803732992 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Make the condition for the studio slice start code match ↵Michael Niedermayer2019-09-28
| | | | | | | | | | | between ff_h263_resync() and ff_mpeg4_decode_studio_slice_header() If they mismatch an infinite loop can occur Fixes: Timeout (infinite loop) Fixes: 17043/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5695051748868096 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ralf: Fix integer overflow in decode_channel()Michael Niedermayer2019-09-28
| | | | | | | | Fixes: signed integer overflow: -1094995519 * 64 cannot be represented in type 'int' Fixes: 17030/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5640695838146560 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vcodec/vc1: compute rangex/y only for P/B framesMichael Niedermayer2019-09-28
| | | | | | | | Fixes: left shift of 1073741824 by 1 places cannot be represented in type 'int' Fixes: 16976/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-4847262047404032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1_pred: Fix invalid shifts in scaleforopp()Michael Niedermayer2019-09-28
| | | | | | | | Fixes: left shift of negative value -2 Fixes: 16964/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5757853565976576 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1_block: Fix invalid shift with rangeredfrmMichael Niedermayer2019-09-28
| | | | | | | | Fixes: left shift of negative value -7 Fixes: 16959/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3_fuzzer-5200360825683968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1: Check for excessive resolutionMichael Niedermayer2019-09-28
| | | | | | | | | Fixes: overflow in aspect ratio calculation Fixes: signed integer overflow: 393215 * 14594 cannot be represented in type 'int' Fixes: 15728/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-5661588893204480 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1: check REFDISTMichael Niedermayer2019-09-28
| | | | | | | "9.1.1.43 P Reference Distance (REFDIST)" "The value of REFDIST shall be less than, or equal to, 16." Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: Allocate decoded_buffer after successful ff_get_buffer()Michael Niedermayer2019-09-28
| | | | | | | | | | | | | We need to reset samples in this case to avoid being stuck with incorrect samples value. Fixes: OOM Fixes: Timeout Fixes: 16627/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5638059583864832 Fixes: 17089/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5672188463546368 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: Fix several integer overflows in predictor_update_filter() ↵Michael Niedermayer2019-09-28
| | | | | | | | | | | | | and do_apply_filter() Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: signed integer overflow: -14527961 - 2147483425 cannot be represented in type 'int' Fixes: 16380/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5645957131141120 Fixes: 16968/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5716169901735936 Fixes: 17074/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5198710497083392 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_cabac: Tighten the limit on k in ff_hevc_cu_qp_delta_abs()Michael Niedermayer2019-09-28
| | | | | | | | | | Values larger would fail subsequent tests. Fixes: signed integer overflow: 5 + 2147483646 cannot be represented in type 'int' Fixes: 16966/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5695709549953024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_xbr: Fix left shift of negative numberAndreas Rheinhardt2019-09-28
| | | | | | | | | Affected every usage of vf_xbr, e.g. the FATE-tests filter-2xbr, filter-3xbr, filter-4xbr. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_hqx: Fix undefined left shifts of negative numbersAndreas Rheinhardt2019-09-28
| | | | | | | | | Affected every usage of this filter; in particular, it affected the FATE-tests filter-2xbr, filter-3xbr and filter-4xbr. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeg2000dwt: Fix undefined shifts of negative numbersAndreas Rheinhardt2019-09-28
| | | | | | | | Affected the vsynth*-jpeg2000 and the vsynth*-jpeg2000-97 FATE tests (where * ranges over { 1, 2, 3, _lena }) as well as ticket #7983. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>