1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

78751 Commits

Author SHA1 Message Date
James Almer
492bbe5890 avcodec/avpacket: fix leak on realloc in av_packet_add_side_data()
If realloc fails, the pointer is overwritten and the previously allocated
buffer is leaked, which goes against the expected behavior of keeping the
packet unchanged in case of error.

Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>

(cherry picked from commit 574929d8b6de32ae712fcca7ab09f01a3e4616be)
2016-11-19 20:24:23 -03:00
Michael Niedermayer
5771a0c823 doc/examples/demuxing_decoding: Drop AVFrame->pts use
This code is not correct for git master

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2bd99564540a365d5b80d9aad6c19264b15955af)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
n3.0.4
2016-10-18 23:00:33 +02:00
Andreas Cadhalpun
f309b698e6 Changelog: update for recent commits
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-17 18:15:04 +02:00
Andreas Cadhalpun
0887f1835d libopenjpegenc: fix out-of-bounds reads when filling the edges
The calculation of width/height should round up, not round down to
prevent setting width or height to 0.

Also image->comps[compno].w is unsigned (at least in openjpeg2), so the
calculation could silently wrap around without the explicit cast to int.

Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 56706ac0d5723cb549fec2602e798ab1bf6004cd)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-17 17:24:40 +02:00
Andreas Cadhalpun
de42af2bee libopenjpegenc: stop reusing image data buffer for openjpeg 2
openjpeg 2 sets the data pointers of the image components to NULL,
causing segfaults if the image is reused.

Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 69c8505f3bf54f316e9dc8bec1c71dfa1febec63)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-17 17:23:55 +02:00
Andreas Cadhalpun
ada229e66f configure: fix detection of libopenjpeg
Use check_lib2 to test the header together with the function. This is
necessary, because '-DOPJ_STATIC' changes what the included header does.

Also add '-DOPJ_STATIC' to CPPFLAGS, so that it isn't necessary to
hardcode this in libavcodec/libopenjpeg{dec,enc}.c.

Finally, check for non-static openjpeg 2.1, too.

Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 7a65aef00d113a38e0d1a54df49eead9df6aa15c)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-17 17:22:01 +02:00
Michael Niedermayer
047e0049d1 Changelog: update for recent commits
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-17 04:55:52 +02:00
Moritz Barsnick
88f52f2f8f cmdutils: fix typos
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3e5d27d7a7350e096eac9f8999d02bf48c3b3a69)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-09 20:14:23 +02:00
Moritz Barsnick
8baf2d8fad lavfi: fix typos
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f4e4bde1f4cff99d4ec59ed361ff9228b2050e6b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-09 20:14:01 +02:00
Moritz Barsnick
17b8e7799f lavc: fix typos
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3305f71025289970fb34473adce5d9c65d1af016)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-09 20:13:48 +02:00
Moritz Barsnick
6457346e6a tools: fix grammar error
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f71c98ee12f9a9e950b4a8fb6b1548fee91ba1f8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-09 20:13:30 +02:00
Hendrik Leppkes
27f1fb1251 ffmpeg: remove unused and errorneous AVFrame timestamp check
Decoders have previously not used AVFrame.pts, and with the upcoming
deprecation of pkt_pts (in favor of pts), this would lead to an errorneous
interpration of timestamps.

(cherry picked from commit 04a3577263782cd6d70722d4ae18d75fee03dbc4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-07 16:11:57 +02:00
Shivraj Patil
c993a11e56 Support for MIPS cpu P6600
Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6803a298f4338c19c3032d2417c6e857eb6d95be)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-06 21:30:53 +02:00
Shivraj Patil
ef5b120e2d avutil/mips/generic_macros_msa: rename macro variable which causes segfault for mips r6
Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c1cc13cd2a9b8d6d2810ec42454f328a1a0d5efa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-06 21:27:25 +02:00
Michael Niedermayer
b9a1d389b2 Update for 3.0.4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:13:09 +02:00
Michael Niedermayer
8c43f32057 avformat/avidec: Check nb_streams in read_gab2_sub()
Fixes null pointer dereference
Fixes: 1/null_point.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2679ad4773aa356e7c3da5c68bc81f02a194617f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
77d5a237ef avformat/avidec: Remove ancient assert
This assert can with crafted files fail, a warning is already printed
for this case.

Fixes assertion failure
Fixes:1/assert.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 14bac7e00d72eac687612d9b125e585011a56d4f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
fb7617df4e avformat/avidec: Fix memleak with dv in avi
Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b98dafe04564d5fe3e5bf5073d871dd93a4a62de)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Sasi Inguva
82b58841c9 lavc/movtextdec.c: Avoid infinite loop on invalid data.
Signed-off-by: Sasi Inguva <isasi@google.com>
(cherry picked from commit 7e9e1b7070242a79fa6e3acd749d7fe76e39ea7b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
e5bf7ab3e7 avcodec/ansi: Check dimensions
Fixes: 1.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 69449da436169e7facaa6d1f3bcbc41cf6ce2754)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
63f951601e avcodec/cavsdsp: use av_clip_uint8() for idct
Fixes out of array read
Fixes: 1.swf

Found-by: 连一汉 <lianyihan@360.cn>
Tested-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0e318f110bcd6bb8e7de9127f2747272e60f48d7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
7fefa4138d avformat/movenc: Check packet in mov_write_single_packet() too
Fixes assertion failure

Found-by: durandal117
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 28343139330f557e00293933a4697c7d0fc19c56)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
a1f77124c8 avformat/movenc: Factor check_pkt() out
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit deabcd2c05b2b01689d91394bbf3908da17234ed)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Xinzheng Zhang
f2f7d49f41 avformat/utils: fix timebase error in avformat_seek_file()
When there is only one stream and stream_index has not specified,
The ts has been transferd by the timebase of stream0 without modifying the stream_index
In this condation it cause seek failure.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ecc04b4f2f29ac676e6c1d1ebf20ec45f5385f1e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
9357aa6757 avcodec/g726: Add missing ADDB output mask
Fixes: 1.poc
Fixes out of array read

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a5af1240fce845f645440364c1335e0f8e44ee6c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
26a8fc1c00 avcodec/avpacket: clear side_data_elems
Fixes null pointer dereference

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5e1bf9d8c0d2cdbbf17b06a5dfdf87a635b3203b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
b7b3b0086d avformat/movenc: Check first DTS similar to dts difference
Fixes assertion failure
Fixes: b84b53855a0b74560e64c6f45f505a13/signal_sigabrt_7ffff6ae7c37_3837_ef4e243ea5b4fa8d0becf4afe9166604.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 68f4c2163ec6d4534ae1756dbcf259845f2e4d2c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
d669b7f4f6 avcodec/ccaption_dec: Use simple array instead of AVBuffer
This is simpler and fixes an out of array read, fixing it with AVBuffers
would be more complex

Fixes: e00d9e6e50e5495cc93fea41147b97bb/asan_heap-oob_12dcdbb_8798_b32a97ea722dd37bb5066812cc674552.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 752e6dfa3ea97e7901870bdd9e5a51f860607240)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Sergey Volk
9259b7f38e avformat/mov: Fix potential integer overflow in mov_read_keys
Actual allocation size is computed as (count + 1)*sizeof(meta_keys), so
we need to check that (count + 1) won't cause overflow.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 347cb14b7cba7560e53f4434b419b9d8800253e7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
cb8a29f872 swscale/swscale_unscaled: Try to fix Rgb16ToPlanarRgb16Wrapper() with slices
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e57d99dd4e0d8fe2992da0d65b563580e35ce728)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Michael Niedermayer
6744d3f6b9 swscale/swscale_unscaled: Fix packed_16bpc_bswap() with slices
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 47bc1bdafb0950ccf128eaa491d8fd7cc0978813)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-28 17:11:52 +02:00
Carl Eugen Hoyos
73b644cdee lavf/utils: Avoid an overflow for huge negative durations.
Fixes ticket #5135.
(cherry picked from commit 267da70ea8c36caaa645a3c4f1c5f0ca8bae156a)
2016-09-24 21:08:23 +02:00
Michael Niedermayer
3512ed3622 Changelog: update
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
n3.0.3
2016-09-05 02:13:28 +02:00
Michael Niedermayer
1d90326f95 avformat/avidec: Fix infinite loop in avi_read_nikon()
Fixes: 360/test.poc

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e4e4a9cad7f21593d4bcb1f2404ea0d373c36c43)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05 01:01:35 +02:00
Michael Niedermayer
1b47c278a6 avformat/utils: End probing if the expected codec surpasses AVPROBE_SCORE_STREAM_RETRY
Fixes Ticket5800

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c75273310cf1becffee79bab0e2bba0b1606afb7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05 01:01:35 +02:00
Michael Niedermayer
cd91aaa4cc avcodec/aacenc: Tighter input checks
Fixes occurance of NaN/Inf leading to assertion failures and out of array access
Fixes: d1c38a09acc34845c6be3a127a5aacaf/signal_sigsegv_3982225_6121_d18bd5451d4245ee09408f04badd1b83.wmv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 77bf96b04710b98a52aaddb93bfd32da0d506191)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05 01:01:35 +02:00
Michael Niedermayer
2858f77fd4 avformat/wtvdec: Check pointer before use
Fixes out of array read
Fixes: 049fdf78565f1ce5665df236d90f8657/asan_heap-oob_10a5a97_1026_42f9d4855547329560f385768de2f3fb.wtv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cc5e5548df4af48674c7aef518e831b19e99f9fc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05 01:01:35 +02:00
Michael Niedermayer
fe7366ee93 libavcodec/wmalosslessdec: Check the remaining bits
Fixes assertion failure
Fixes: 24ebfda03228b5cc1ef792608cfba458/signal_sigabrt_7ffff6ae7c37_6473_3fa8a111dbc752b1a7c411c5ab79aaa4.wma

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 67318187fbba382d887f9581dde48a50842f1bea)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05 01:01:35 +02:00
Michael Niedermayer
4ab41164d2 avcodec/diracdec: Check numx/y
Fixes division by 0
Fixes: 60261c4469ba3e11059890fb2832a515/asan_generic_135e694_2790_beb94eaa0aeb7d11c0437375a8964a99.drc

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a31e08fa1aa5c5f0518b8af850f28eb945268e66)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05 01:01:35 +02:00
Michael Niedermayer
d794d97d96 avcodec/cfhd: Increase minimum band dimension to 3
The implementation does not currently support len=2

Fixes out of array accesses
Fixes: 29d1b3db5ba2205e82b0b3a533e057a3/asan_heap-oob_12b650c_9254_3b8c4e4d931eb2c32841c18ebb297f1d.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b8b36717217c6f45db71c77ad4e7c65521e7d9ff)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05 01:01:35 +02:00
Michael Niedermayer
93534cd642 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 9ffe44c5c75c485b4cbb12751e228f18da219df3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05 01:01:35 +02:00
Michael Niedermayer
ca92adafb0 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 a453bbb68f3eec202673728988bba3bc76071761)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05 01:01:35 +02:00
Michael Niedermayer
815a4439c3 avcodec/rawdec: Fix bits_per_coded_sample checks
Fixes assertion failure
Fixes: 9eb9cf5b8c26dd0fa7107ed0348dcc1f/signal_sigabrt_7ffff6ae7c37_8926_4609a5c3f071d555d2d557625f9687b1.swf

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 237207645b36fb79759d313c0399ee93ba467b9d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-05 01:01:35 +02:00
Carl Eugen Hoyos
17035c8d2e lavc/mjpegdec: Do not skip reading quantization tables.
They may contain 0xFFs, confusing the start code finding algorithm.

Fixes ticket #5819.
(cherry picked from commit cef5bc0e6e2320d3903cf063d59cef83e91dbc3c)

Conflicts:
	libavcodec/mjpegdec.c
2016-09-03 15:35:12 +02:00
Tobias Rapp
426b959e37 cmdutils: fix implicit declaration of SetDllDirectory function
Pre-processor check changed by commiter.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-08-29 20:00:51 -03:00
James Almer
61fcba7546 cmdutils: check for SetDllDirectory() availability
It's only available on Windows XP or newer.

Should fix compilation with mingw32 using the default OS target.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-08-22 19:24:31 -03:00
Michael Niedermayer
66bd740e0b avcodec/h264: Put context_count check back
Fixes assertion failure

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f883f0b0bd0dac76b58e49f5c75cf9b497eecaa0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 15:05:44 +02:00
Michael Niedermayer
534dc63089 Update for 3.0.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 14:23:46 +02:00
Hendrik Leppkes
09d1854063 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 3bf142c77337814458ed8e036796934032d9837f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 13:08:57 +02:00
Michael Niedermayer
ab9616428a avcodec/raw: Fix decoding of ilacetest.mov
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bbec14de3126dbc4e1ec2b32ed714dab173386aa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 13:08:57 +02:00