1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

78575 Commits

Author SHA1 Message Date
Michael Niedermayer
603fd4f771 avcodec/bmp_parser: Check fsize
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 43a4276c6964a2ec57e08c3c622bb94d35c0441f)

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 37005e65eb17b1480d9e1755eeba3f50ee3b9555)

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 250b620d296adba7bd3a3104a9c30e820fb0bc36)

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 bfe945ac3a0c328371dc4b4cc3409b7da5784cb8)

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 abc957e896beb3ce33c5691b9b3701993a381852)

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 b092ee701f4d0ef2b8a4171cd38101d1ee9a1034)

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 e85d38c20a8893cb59d7c86f74481f2497882196)
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 5adfbd391847fcdaea1e9b105fae2dd90af2a733)
2016-07-25 10:00:10 -03:00
James Almer
4774eb8128 Revert "configure: Enable GCC vectorization on ≥4.9 on x86"
This reverts commit cb8646af24bd8e9627cc5e1c62b049a00fe0b07b.

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 fd6dbc53855fbfc9a782095d0ffe11dd3a98905f)
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 e9394ca63dab3434bc8e869de019ecd86cb604ac)
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 1bd9fb6de59bb96144ece914643d2d205818168d)
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 e5d434b840404d84585456e51755e052a0fe0731)
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 39c0b22df42088cf4fb1ceb2447291c224a5c7ed)

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 d0388bd32e1c84a9ef87ba6c448c7fffb6a9f259)

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 1a82d2cf8fb6a7e854e7548dfcf73c3d046b34ac)

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 c1ed78a591f68f3c81eded0bfaac313937ffa3b6)

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 2be3007ed55f1513bcae3d2a076e71878f48eb03)

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 89e9393022373bf97d528e6e9f2601ad0b3d0fc1)

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 d970f7ba31246040787e5ea6eb73bb85cafb932b)

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 7ecfe4dc363435c81e66dd14881dc0b0ccc73fb1)

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 d08f2c172fd2baab022f0118f49e5b2852a2d463)

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 2875745d354ab0ebc4af1ebaca5c5a8d26ccdc03)

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 635b2ec5f20d6cdef1adf4907ca28f8f09abcecc)

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 6085d6b2aeef28671614f625601a23cfc922d282)

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 feeb3a92616310b5f79191b0ef3064712c40b7d3)

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 2f76157eb05bf63725f96167feda6b2e07501c7e)

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:30 +02:00
Will Kelleher
7c43c48fda hevc: Fix memory leak related to a53_caption data
Signed-off-by: Will Kelleher <wkelleher@gogoair.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 964f07f68e1cc4e2d585615e2b1a1fade269afb0)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:30 +02:00
Chris Cunningham
069eea16d9 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 542f725964e52201000ec34e2f23229cf534ad3a)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:30 +02:00
Michael Niedermayer
79181b97d4 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 ea791c080dd5494b3bee0c618a3f52e371b5f320)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:30 +02:00
Michael Niedermayer
46360e36d9 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 8efaee3710baa87af40556a622bf2d96a27c6425)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:30 +02:00
Michael Niedermayer
ef2b8416d9 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 deaf58abf236e09fc9b97db29f1edd064e4b5ad4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:30 +02:00
Michael Niedermayer
9491f47035 avformat/options_table: Add missing identifier for very strict compliance
Fixes Ticket5443

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:30 +02:00
Michael Niedermayer
2fc7e5c1b5 avformat/ffmdec: Check pix_fmt
Fixes crash
Fixes Ticket5412

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:40:30 +02:00
James Almer
68dcb46205 doc/general: update supported DCA extensions 2016-05-14 23:02:52 -03:00
James Almer
8dce66d33d avcodec/rscc: check input buffer size for deflate mode
Fixes overreads.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit b2244fa0a624f7e38893d58265e9c039bed2e4de)
2016-05-10 19:13:54 -03:00
foo86
08c21bcb5d avcodec/dca: fix sync word search error condition
This didn't actually check if sync word was found and always errored out
with "-err_detect explode" option enabled.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ce2f9fdb0a92956aedfa2c564d1374a2f1eebfbd)
2016-05-02 22:48:52 -03:00
Carl Eugen Hoyos
e675926a4f lavf/mpegts: Return small probe score for very short transport streams.
Fixes Debian bug 823098.

(cherry picked from commit 88a849c714c17ad80d411f68e6575dfa1c8e8358)
2016-05-02 22:48:45 -03:00
Michael Niedermayer
c66f4d1ae6 Changelog: Fix minor formating inconsistency
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
n3.0.2
2016-04-28 03:03:39 +02:00
Michael Niedermayer
ad559492dc update for 3.0.2
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-28 01:40:54 +02:00
Michael Niedermayer
8d0cfa68b9 avcodec/ttaenc: Reallocate packet if its too small
Fixes assertion failure
Fixes Ticket5394

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-26 19:49:09 +02:00
Shivraj Patil
83eaaae005 configure: build fix for P5600 with mips code restructuring
Note:- backporting commit 15ef98afd10b3696d29fb6d19606ba03a9dd47ad from head

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-26 12:27:49 +02:00
Vicente Olivert Riera
a5638dbfba mips: add support for R6
Note:- backporting commit ad16eff64ba78d8dc98a8324640025c7cb2857f3 from head

Understanding the mips32r6 and mips64r6 ISAs in the configure script is
not enough. In order to have full support for MIPS R6 in FFmpeg we need
to be able to build it, and for that we need to make sure we don't use
incompatible assembler code which makes the build fail. Ifdefing the
offending code is sufficient to fix the problem.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-26 12:27:39 +02:00
Jan Ekström
666754c665 pgssubdec: fix subpicture output colorspace and range
Functionality used before didn't widen the values from limited to
full range. Additionally, now the decoder uses BT.709 where it
should be used according to the video resolution.

Default for not yet set colorimetry is BT.709 due to most observed
HDMV content being HD.

BT.709 coefficients were gathered from the first two parts of BT.709
to BT.2020 conversion guide in ARIB STD-B62 (Pt. 1, Chapter 6.2.2).
They were additionally confirmed by manually calculating values.

Fixes #4637
(cherry picked from commit 9779b6262471d553c1ed811ff7312564e39d8adf)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-26 02:47:09 +02:00
Michael Niedermayer
4c896d6bd4 avcodec/ac3dec: Reset SPX when switching from EAC3 to AC3
Fixes Ticket5319

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-25 04:27:29 +02:00
Michael Niedermayer
f2e9e4757f avfilter/vf_drawtext: Check return code of load_glyph()
Fixes segfault
Fixes Ticket5347

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-24 12:41:09 +02:00
Michael Niedermayer
512c064cd9 avformat/mux: Check that deinit is set before calling it
Fixes null pointer dereference

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-24 12:40:58 +02:00
Paul B Mahol
7626fb6cbf avcodec/takdec: add code that got somehow lost in process of REing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 38797a8033d061ade58b30b8ac86da222fe42a84)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-21 14:13:38 +02:00
Paul B Mahol
6fdd122b11 avcodec/apedec: fix decoding of stereo files with one channel full of silence
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 9149e9c0baaec122bc3da925d6068dffa60b5427)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-21 14:12:45 +02:00
Michael Niedermayer
264c9fe6aa avcodec/avpacket: Fix off by 5 error
Fixes out of array read
Fixes: mozilla bug 1266129
Found-by: Tyson Smith
Tested-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9f36ea57ae6eefb42432220feab0350494f4144c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-21 00:54:00 +02:00