1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-03 05:10:03 +02:00
Commit Graph

75285 Commits

Author SHA1 Message Date
Michael Niedermayer
2b135f266d avcodec/indeo2: check ctab
Fixes out of array access
Fixes: 6b73fa392ac808f02e95a4e0a5770026/asan_static-oob_1b15f9a_1969_e7778535e5f27225fe0d6ded14721430.AVI

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9ffe44c5c7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-19 14:47:39 +02:00
Michael Niedermayer
e965fedf7e avformat/swfdec: Fix inflate() error code check
Fixes infinite loop
Fixes endless.poc

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a453bbb68f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-19 11:03:50 +02:00
Michael Niedermayer
7132e71a84 Update for FFmpeg 2.8.8
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 22:26:37 +02:00
Michael Niedermayer
7a2329fac1 avcodec/h264: Put context_count check back
Fixes assertion failure

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f883f0b0bd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:14 +02:00
Hendrik Leppkes
65fff8e71a cmdutils: remove the current working directory from the DLL search path on win32
Reviewed-by: Matt Oliver <protogonoi@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3bf142c773)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
3988470ee3 avcodec/raw: Fix decoding of ilacetest.mov
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bbec14de31)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
3a6b27caf8 avcodec/ffv1enc: Fix assertion failure with non zero bits per sample
Fixes Ticket5736
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

(cherry picked from commit c1bfeda5a3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
942c3bfbdf avformat/oggdec: Fix integer overflow with invalid pts
If negative pts are possible for some codecs in ogg then the code needs to be
changed to use signed values.

Found-by: Thomas Guilbert <tguilbert@google.com>
Fixes: clusterfuzz_usan-2016-08-02
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c5cc3b08e5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
486aa4fe39 ffplay: Fix invalid array index
Found-by: Thomas Guilbert <tguilbert@google.com>
Fixes: clusterfuzz_usan-2016-08-02
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6cd9a8b67a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
da12d544bf avcodec/vp9_parser: Check the input frame sizes for being consistent
Suggested-by: BBB
Fixed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 77b0f3f26d)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Kacper Michajłow
73e09e371b libavformat/rtpdec_asf: zero initialize the AVIOContext struct
This fixes crash in avformat_open_input() when accessing
protocol_whitelist field.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e947b75b1c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Kacper Michajłow
d3ecb24539 libavutil/opt: Small bugfix in example.
Fix const corectness and zero init the struct. This example code would actually crash when initializing string.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 69630f4d30)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Sasi Inguva
0f6e244bb0 libx264: Increase x264 opts character limit to 4096
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 282477bf45)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
054db63120 avformat/mov: Check sample size
Fixes integer overflow
Fixes: poc.mp4

Found-by: ajax secure <ajax4sec@hotmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8a3221cc67)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
4a0b0cffc1 avformat/format: Fix registering a format more than once and related races
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4cc896ea5f)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 20:25:13 +02:00
Michael Niedermayer
9fefd76eec avcodec/flac_parser: Raise threshold for detecting invalid data
Fixes regression from Ticket5428

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b0b3676e13)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
087bd8fbdf avfilter/vf_telecine: Make frame writable before writing into it
Fixes Ticket 5627

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fa0097e008)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
40ffbe7678 avcodec/mpc8: Correct end truncation
Fixes Ticket5478

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b21f674876)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
ed7fe48445 avcodec/mpegvideo: Do not clear the parse context during init
It is allocated before, this cannot work
Fixes Ticket5613

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 24f5136196)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
d9ad05abce MAINTAINERs cleanup (remove myself from things i de facto dont maintain)
x86 is maintained entirely by others these days
ML, mostly too

remove myself from a few spots that have other maintainers and where i
just dont know the code that well anyway to do an ideal job

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bb5bc08ba6)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
bfca58ee2f avcodec/h264: Fix off by 1 context count
Fixes fate-h264-xavc-4389 with slice threads
(cherry picked from commit 27c1eae55f)

Conflicts:

	libavcodec/h264.c

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
8a32f19d5b avcodec/alsdec: Check r to prevent out of array read
No testcase known

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c36fc857b5)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Umair Khan
1dd34bdb09 avcodec/alsdec: fix max bits in ltp prefix code
The maximum number of bits int the prefix code for
p(0) is 4. By setting it as 3, we were missing the
last 0 bit.
This fixes bug #4715 present on the trac.

Signed-off-by: Umair Khan <omerjerk@gmail.com>
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5d64ba9d18)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
04987035ff avcodec/utils: check skip_samples signedness
Fixes Ticket5528

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 153ab83bd3)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
a4484854db avformat/mpegts: Do not trust BSSD descriptor, it is sometimes not an S302M stream
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a5eb70ad95)

Conflicts:

	libavformat/mpegts.c
2016-08-15 18:54:34 +02:00
Michael Niedermayer
003fa5c3e3 avcodec/bmp_parser: Check fsize
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 43a4276c69)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
166921c23e avcodec/bmp_parser: reset state
Fixes part of ticket 5598

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 37005e65eb)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
591c0b527c avcodec/bmp_parser: Fix remaining size
Fixes part of ticket 5598

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 250b620d29)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
731848ef80 avcodec/bmp_parser: Fix frame_start_found in cross frame cases
Fixes part of ticket 5598

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bfe945ac3a)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
76fd8145a1 avfilter/af_amix: dont fail if there are no samples in output_frame()
Fixes Ticket5326

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit abc957e896)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Vivekanand
5af0ada442 avformat/allformats: Making av_register_all() thread-safe.
When multiple threads tries to call av_register_all(), the first thread sets
initialized to 1 and do the register process. At the same time, other thread might
also call av_register_all(), which returns immediately because initialized is set to 1
(even when it has not completed registering codecs). We can avoid this problem
if we set initialised to 1 while exiting from function.

Github: Closes #196
(cherry picked from commit b092ee701f)

Conflicts:

	libavformat/allformats.c
2016-08-15 18:54:34 +02:00
Michael Niedermayer
ffb503c9a1 avcodec/mpegvideo: Deallocate last/next picture earlier
Fixes regression with mplayers direct rendering and reduces buffer count
pressure in some cases

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 39c0b22df4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
2bbbd3e50a avcodec/bmp_parser: Fix state
Fixes Ticket5598

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d0388bd32e)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Thomas Guilbert
669fc1338f avformat/oggparseopus: Fix Undefined behavior in oggparseopus.c and libavformat/utils.c
Fixes: usan_granule_overflow

constant type fix by commiter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1a82d2cf8f)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
9fe1012910 doc/developer.texi: Add a code of conduct
See: [FFmpeg-devel] [Vote] Code of Conduct

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 89e9393022)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
90b27febc6 avformat/avidec: Detect index with too short entries
Fixes Ticket5498

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d08f2c172f)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Chris Cunningham
c1c6cb21b7 avformat/utils: Check negative bps before shifting in ff_get_pcm_codec_id()
Fixes: undefined shift.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2875745d35)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
2e0af764b3 avformat/utils: Do not compute the bitrate from duration == 0
Fixes division by 0 in fate-acodec-ra144

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 635b2ec5f2)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
8857dc6cd8 ffmpeg: Check that r_frame_rate is set before attempting to use it
Avoids unexpected occurance and dependency on NaN behavior and divisions by 0

Testcase: fate-lavf-fate-avi_cram

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6085d6b2ae)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
67c7f8ca14 swresample/rematrix: Use clipping s16 rematrixing if overflows are possible
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2f76157eb0)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
500cf2e159 swresample/rematrix: Use error diffusion to avoid error in the DC component of the matrix
This fixes the sum of the integer coefficients ending up summing to a value
larger than the value representing unity.

This issue occurs with qN0.dts when converting to stereo

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7fe81bc4f8)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Chris Cunningham
345231336f libavformat/oggdec: Free stream private when header parsing fails.
Leaking this private structure opens up the possibility that it may
be re-used when parsing later packets in the stream. This is
problematic if the later packets are not the same codec type (e.g.
private allocated during Vorbis parsing, but later packets are Opus
and the private is assumed to be the oggopus_private type in
opus_header()).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 542f725964)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
fc6f314838 avformat/utils: Check bps before using it in a shift in ff_get_pcm_codec_id()
Fixes undefined shift
Fixes: usan_shift

Found-by: Thomas Guilbert <tguilbert@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ea791c080d)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
3bbef6082a avformat/oggparseopus: Check that granule pos is within the supported range
Larger values would imply file durations of astronomic proportions and cause
overflows

Fixes integer overflow
Fixes: usan_int64_overflow

Found-by: Thomas Guilbert <tguilbert@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8efaee3710)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
0aaf66fb2e avcodec/mjpegdec: Do not try to detect last scan but apply idct after all scans for progressive jpeg
Fixes: IMG-20160418-WA0002.jpg

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit deaf58abf2)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Michael Niedermayer
330f4ef48c avformat/options_table: Add missing identifier for very strict compliance
Fixes Ticket5443

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 11db7eee9b)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-15 18:54:34 +02:00
Luca Barbato
8887dafda1 librtmp: Avoid an infiniloop setting connection arguments
The exit condition was missing.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
(cherry picked from commit e85d38c20a)
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2016-07-26 12:08:58 -07:00
James Almer
e9b7ae08d6 avformat/oggparsevp8: fix pts calculation on pages ending with an invisible frame
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 5adfbd3918)
2016-07-25 09:59:54 -03:00
Michael Niedermayer
da4ea97161 Changelog: update
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-29 13:27:40 +02:00
Michael Niedermayer
4e4afe29b9 avcodec/motion_est: Attempt to fix "short data segment overflowed" on IA64
This decreases the MV related encoding table sizes
This should have little effect on real world video encoding performance

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d7c75a5db0)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-29 13:04:17 +02:00