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

78749 Commits

Author SHA1 Message Date
Michael Niedermayer
7876fd679d 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-13 13:08:57 +02:00
Michael Niedermayer
8b3d9c33d6 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-13 13:08:57 +02:00
Kacper Michajłow
c575726621 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-13 13:08:57 +02:00
Kacper Michajłow
6e6609f5dd 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-13 13:08:57 +02:00
Sasi Inguva
6e13acaadd 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-13 13:08:57 +02:00
Michael Niedermayer
a5680d83af 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-13 13:08:57 +02:00
Michael Niedermayer
811d560378 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-13 13:08:57 +02:00
Michael Niedermayer
c34f0616d9 avformat/flacdec: Fix seeking close to EOF
Fixes Ticket5428

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 13:08:57 +02:00
Michael Niedermayer
96ce6f64cc 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-13 13:08:57 +02:00
Michael Niedermayer
13b6852225 avformat/flvdec: Accept last size if its off by 1
Fixes part of Ticket5648

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 13:08:57 +02:00
Michael Niedermayer
d13ba39606 tests/api/api-codec-param-test: Do not directly access caps_internal
The caps_internal field has moved without major bump and direct
access causes crashes, found when testing 3.1

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 13:08:57 +02:00
Michael Niedermayer
19b86db2b3 avcodec: Add avpriv_codec_get_cap_skip_frame_fill_param()
With this the use of the caps_internal from libavformat can be avoided

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 13:08:57 +02:00
Michael Niedermayer
694d37eb52 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-13 13:08:57 +02:00
Michael Niedermayer
4e5d1c45f1 avformat/mpegts: adjust probe score for low check_count
Fixes mis-detection of tiff as mpegts
Fixes Ticket5565

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 13:08:57 +02:00
Michael Niedermayer
2577cfd207 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-13 13:08:57 +02:00
Michael Niedermayer
280587b4ab avformat/mp3dec: Increase probe score slightly when the whole data from begin to end is mp3
Improves score for 1000-frames-of-noise-encoded-with-lame.mp3 without file extension

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 13:08:57 +02:00
Michael Niedermayer
5bf11223dd avcodec/cfhd: Set dimensions unconditionally
Fixes Ticket5215

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 056a4ae771)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 13:08:57 +02:00
Michael Niedermayer
679e869496 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-13 13:08:57 +02:00
Michael Niedermayer
7216068e42 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-13 13:08:57 +02:00
Michael Niedermayer
e7a064efa6 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-13 13:08:57 +02:00
Michael Niedermayer
a004e2e4f1 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-13 13:08:57 +02:00
Umair Khan
f50f7adf7a 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-13 13:08:57 +02:00
Michael Niedermayer
9cf85419a3 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-13 13:08:57 +02:00
Michael Niedermayer
b3fe93e73b 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-13 13:08:57 +02:00
Michael Niedermayer
603fd4f771 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-13 13:08:57 +02:00
Michael Niedermayer
76a239768f 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-13 13:08:57 +02:00
Michael Niedermayer
fca62cc6a7 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-13 13:08:57 +02:00
Michael Niedermayer
9f1e8b4fb2 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-13 13:08:57 +02:00
Michael Niedermayer
b2a2b1a88b 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-13 13:08:57 +02:00
Vivekanand
f3c1a76ffd 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-13 13:08:57 +02:00
Luca Barbato
b62191f9c1 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:07:55 -07:00
James Almer
21c36d83f8 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 10:00:10 -03:00
James Almer
4774eb8128 Revert "configure: Enable GCC vectorization on ≥4.9 on x86"
This reverts commit cb8646af24.

This change has brough more issues than benefits, between compilation
time failures depending on flags used and code miscompilation causing
runtime crashes.

See the "[PATCH 2/2] configure: Enable GCC vectorization on ≥4.9"
thread in the ffmpeg-devel mailing list for the relevant discussion.

(cherry picked from commit fd6dbc5385)
2016-07-09 17:39:31 -03:00
Michael Niedermayer
96f5019bde avcodec/libopenjpegenc: Set numresolutions by default to a value that is not too large
Fixes issues with libopenjpeg 2.1

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e9394ca63d)
2016-07-01 00:01:46 -03:00
Timo Rothenpieler
bffe1c4222 ffplay: Fix usage of private lavfi API
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1bd9fb6de5)
2016-06-29 22:49:58 -03:00
Michael Niedermayer
fbdf5ca763 tests/checkasm/checkasm: Disable checkasm_check_pixblockdsp for ppc64be
See: Ticket5508

Suggested-by: Carl
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e5d434b840)
2016-06-26 04:17:59 +02:00
Michael Niedermayer
c6470d8193 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-06-05 02:40:31 +02:00
Michael Niedermayer
e5942c1436 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-06-05 02:40:31 +02:00
Thomas Guilbert
dab82a2a7c 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-06-05 02:40:31 +02:00
Michael Niedermayer
7f864badc0 avformat/utils: avoid overflow in compute_chapters_end() with huge durations
Fixes: usan_granule_overflow

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:31 +02:00
Michael Niedermayer
cc1e01d8b6 avformat/utils: avoid overflow in update_stream_timings() with huge durations
Fixes: usan_granule_overflow

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:31 +02:00
Michael Niedermayer
69c3dfdd54 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-06-05 02:40:31 +02:00
Gregor Riepl
241f1e603f ffserver: fixed deallocation bug in build_feed_streams
Signed-off-by: Gregor Riepl <onitake@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d970f7ba31)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:31 +02:00
Michael Niedermayer
4d9fdca053 avcodec/diracdec: Fix potential integer overflow
Fixes CID1361948

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:31 +02:00
Michael Niedermayer
b11900251f 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-06-05 02:40:31 +02:00
Chris Cunningham
145b18ce9a 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-06-05 02:40:31 +02:00
Michael Niedermayer
e5d167149d 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-06-05 02:40:31 +02:00
Michael Niedermayer
ed71759fd0 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-06-05 02:40:31 +02:00
Michael Niedermayer
d7ae13d479 swresample/resample: Fix division by 0 with tap_count=1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit feeb3a9261)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:31 +02:00
Michael Niedermayer
1cd872a7d5 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-06-05 02:40:31 +02:00