Commit Graph

93656 Commits

Author SHA1 Message Date
Michael Niedermayer 6f0e9a8634 avutil/avstring: Fix bug and undefined behavior in av_strncasecmp()
The function in case of n=0 would read more bytes than 0.
The end pointer could be beyond the allocated space, which
is undefined.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-24 17:05:02 +02:00
Michael Niedermayer 18a567c369 avformat/mov: Skip stsd adjustment without chunks
Fixes: Assertion failure
Fixes: clusterfuzz-testcase-minimized-media_pipeline_integration_fuzzer-5683096400822272

Found-by: Clusterfuzz
Reported-by: Dan Sanders <sandersd@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-24 17:05:02 +02:00
Michael Niedermayer ed188f6dcd avformat/aadec: Check for scanf() failure
Fixes: use of uninitialized variables
Fixes: blank.aa

Found-by: Chamal De Silva <chamal.desilva@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-24 17:05:02 +02:00
Michael Niedermayer 9570322a2d avcodec/dxtory: Check slice_size against minimum in dxtory_decode_v2()
Fixes: Timeout (33sec -> 16 milli sec)
Fixes: 14181/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5681840708386816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-24 17:05:02 +02:00
Michael Niedermayer fee6661045 avcodec/dsicinvideo: check the amount decoded by cin_decode_huffman()
Fixes: Timeout (158sec -> 36sec)
Fixes: 14214/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSICINVIDEO_fuzzer-5633569034076160

This is untested with valid cin files as none of the files i found cover the changed
codepath

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-24 17:05:02 +02:00
Michael Niedermayer caa9b4ff89 avcodec/agm: Check that there is available input in read_code()
Fixes: Timeout (46sec -> 7ms)
Fixes: 14030/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5721258760601600

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-24 17:05:02 +02:00
Carl Eugen Hoyos d0ca749adb tests/fate-run: New variable hostexecsuf for local fate tools.
Allows running fate in-tree on wsl with msvc.
2019-04-24 01:42:56 +02:00
Cyber Sinh 499b46fd0a compat/windows/makedef: Allow building shared libs with MSVC under WSL
A similar patch was posted by Gilles Khouzam in his blog.
2019-04-24 01:41:13 +02:00
Takayuki 'January June' Suwa f9a061a31c avdevice/alsa: fix indefinite stop on closing PCM capture
Fixes: https://bugs.archlinux.org/task/58619

Found-by: Elias (Bleuzen) https://bugs.archlinux.org/user/26956
Signed-off-by: Nicolas George <george@nsup.org>
2019-04-23 14:01:23 -08:00
Dan Sanders 22c820f509 libavformat/mov: limit nb_frames_for_fps to INT_MAX
It's this or add overflow detection in mov_read_header().

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-23 22:13:34 +02:00
Paul B Mahol 4a69b18242 avfilter/af_surround: export more channel's in/out gains 2019-04-23 17:48:10 +02:00
Paul B Mahol ce15c3a4c8 avfilter/af_surround: switch to activate 2019-04-23 13:37:41 +02:00
Paul B Mahol 7a128ac2bc avfilter/af_surround: expose window size to user 2019-04-23 13:37:41 +02:00
Paul B Mahol ccc07ebe45 avfilter/af_surround: add 6.1/6.0 upmix from stereo 2019-04-23 13:37:41 +02:00
Sergey Svechnikov 703583dbb1 avcodec/cuviddec: improve progressive frame detection
There are 2 types of problems when using adaptive deinterlace with cuvid:

1. Sometimes, in the middle of transcoding, cuvid outputs frames with visible horizontal lines (as though weave deinterlace method was chosen);
2. Occasionally, on scene changes, cuvid outputs a wrong frame, which should have been shown several seconds before (as if the frame was assigned some wrong PTS value).

The reason is that sometimes CUVIDPARSERDISPINFO has property progressive_frame equal to 1 with interlaced videos.
In order to fix the problem we should check if the video is interlaced or progressive in the beginning of a video sequence (cuvid_handle_video_sequence).
And then we just use this information instead of the property progressive_frame in CUVIDPARSERDISPINFO (which is unreliable).

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-04-23 12:48:08 +02:00
Jun Zhao a087764847 examples/avio_reading: Use avio_context_free() to free AVIOContext
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-04-23 08:36:39 +08:00
Paul B Mahol 26fd40b568 avfilter/af_surround: make channel spread from stereo image user configurable 2019-04-22 22:15:01 +02:00
Paul B Mahol dbb35abf28 avfilter/af_surround: add lfe_mode option 2019-04-22 22:15:01 +02:00
Paul B Mahol c6c94303d4 avfilter/af_surround: avoid divisions with very small numbers 2019-04-22 22:15:01 +02:00
Gyan Doshi 6829c3cbe4 avformat/mpegenc - reject unsupported audio streams
Only MP1, MP2, MP3, 16-bit PCM_DVD, PCM S16BE,
AC3 and DTS audio codecs are supported by the muxer.
2019-04-22 21:25:55 +05:30
Jun Zhao 8d3630c540 lavf/oggparsevorbis: Fix change the case of metadata keys issue
The spec in https://xiph.org/vorbis/doc/v-comment.html states that
the metadata keys are case-insensitive, so don't change the case
and update the fate test case.

Fix #7784

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-04-22 23:24:42 +08:00
Karthick J eeca67e023 avformat/dashenc: Fix a bug with writing "final" manifest
This bug was introduced in the commit 951561b64e
2019-04-22 11:31:25 +05:30
Steven Liu 613ca7b100 avformat/dashdec: add ProgramInformation parser
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-04-22 12:51:34 +08:00
Michael Niedermayer df9ef925f9 avcodec/agm: remove ;;
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-21 23:29:04 +02:00
Michael Niedermayer 7ee7bb92e6 avcodec/agm: Check for too many too short codes in make_new_tree()
Fixes: SEGV on unknown address
Fixes: 14198/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5723579234123776

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>
2019-04-21 23:29:04 +02:00
Michael Niedermayer 158efc045c avcodec/agm: Do not crash on invalid codes
I do not know if such vlc trees are allowed in agm, I have no specification
So i do not know if these should be treated as error, or not.
But the code does contain a check for idx < 0 already ...

Fixes: Stack-buffer-overflow in get_tree_codes
Fixes: 14189/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5745747003179008

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>
2019-04-21 23:29:04 +02:00
Michael Niedermayer f17e8e90bb avcodec/ccaption_dec: Add a blank like at the end to avoid rollup reading from outside
Fixes: index 20 out of bounds for type 'const char *[4][128]'
Fixes: 14367/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CCAPTION_fuzzer-5718819672162304

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-21 23:29:04 +02:00
Paul B Mahol dafcdeb258 lavfi/avf_showwaves: fix extra gaps at end of waveform
Fixes #5931.
2019-04-21 21:12:03 +02:00
Paul B Mahol 833ae5f4bf avcodec/dvdec: add frame threads 2019-04-21 19:43:14 +02:00
Jun Zhao b272d5b9b6 lavfi/frei0r: Fixes the compilation warnings
Fixes the compilation warnings

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-04-21 21:20:16 +08:00
Gyan Doshi 6e0488cac4 doc/codecs: mention error returned for flag AV_CODEC_FLAG_DROPCHANGED 2019-04-21 10:07:17 +05:30
Lou Logan d8245cff16 doc/mailing-list-faq: auto unsubscribe due to DMARC
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-04-20 13:55:39 -08:00
Jarek Samic 1c46ab4815 lavfi: add colorkey_opencl filter
This is a direct port of the CPU filter.

Signed-off-by: Jarek Samic <cldfire3@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2019-04-20 16:32:34 +01:00
Paul B Mahol 782ae68a11 avfilter: add lagfun filter 2019-04-20 14:20:07 +02:00
Paul B Mahol e20ad3bd59 avfilter/vf_lut3d: add cineSpace 3D lut support 2019-04-20 13:52:42 +02:00
Paul B Mahol b9d25b1a6e avfilter/vf_lut3d: add cineSpace 1D lut parsing 2019-04-20 13:52:41 +02:00
Gyan Doshi bf4245e952 doc/filters: list values for af_surround window function 2019-04-20 17:07:32 +05:30
Paul B Mahol fee7c15d87 avfilter/af_surround: allow user to change overlap and win_func 2019-04-20 12:02:50 +02:00
Gyan Doshi 3a07aec827 doc/APIchanges: update for 3153a6502a
Entry for added avcodec flag AV_CODEC_FLAG_DROPCHANGED
2019-04-20 10:47:48 +05:30
Gyan Doshi 3153a6502a avcodec: add AV_CODEC_FLAG_DROPCHANGED to flags
Discard decoded frames which differ from first decoded frame in stream.
2019-04-20 10:38:01 +05:30
Jun Zhao d93e44332f lavf: bump version/add APIchanges entry when cleanup applehttp
commit abfeba9 "lavf/hls: Cleanup the applehttp" missed
the version bump and APIchanges entry.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-04-20 07:26:58 +08:00
Carl Eugen Hoyos 93209902ed lavfi/fspp: Simplify a macro.
Silences a warning with clang:
warning: implicit conversion from 'int' to 'int16_t' (aka 'short') changes value from 44130 to -21406
2019-04-20 00:20:07 +02:00
Carl Eugen Hoyos 48860df34d configure: Add .exe suffix to toolchain calls.
Allows in-tree msvc compilation with wsl.
2019-04-20 00:12:34 +02:00
Michael Niedermayer 838710bd6c avcodec/pictordec: Only recalculate d when y changes in picmemset()
Fixes: Timeout (21->18sec)
Fixes: 14124/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-5633887734071296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-19 21:06:40 +02:00
Michael Niedermayer 3ed360ea5c avcodec/pictordec: avoid pointers in picmemset()
Improves overall speed by about 3%
Testcase: 14124/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-5633887734071296

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-19 21:06:38 +02:00
Michael Niedermayer bcf9d2a172 avcodec/wmv2dec: Check that the P frame secondary header fit in the input
Fixes: Timeout (64sec ->2 sec)
Fixes: 14131/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-5719879556005888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-19 21:06:09 +02:00
Michael Niedermayer 110dce9633 avcodec/ivi: Move buffer/block end check to caller of ivi_dc_transform()
Fixes: assertion failure
Fixes: 14078/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5760571284127744

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-19 21:06:09 +02:00
Michael Niedermayer 837820f385 avcodec/diracdec: Use 64bit in intermediate of global motion vector field generation
It seems the specification does not limit the value to 32bit

Fixes: signed integer overflow: -109611143 * 24 cannot be represented in type 'int'
Fixes: 13477/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5648337460527104

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-19 21:06:09 +02:00
Dan Sanders fac761dae9 avformat/apetag: tag values are unsigned
Fixes: UBSan runtime error
Found-by: Clusterfuzz
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-04-19 13:22:54 -03:00
Andreas Hakon e750dc9de6 libavformat: improve logs with cur_dts
This patch improves the logs when the message "cur_dts is invalid" appears.
If helps to identify which stream generates the trouble,
and the status of the stream.
A lot of users suffers with the message, and the origin varies.
The improved message can help to discover the cause.

Signed-off-by: Andreas Hakon <andreas.hakon@protonmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-04-19 17:14:44 +02:00