ffmpeg.git
4 years agotree-test: fix printf() types n1.0.7
Michael Niedermayer [Tue, 30 Oct 2012 21:34:36 +0000 (22:34 +0100)]
tree-test: fix printf() types

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6c49562d790e9068ddcbb36197d7b24ab10c6274)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agotree: fix type used for testing the tree
Michael Niedermayer [Mon, 29 Oct 2012 21:21:25 +0000 (22:21 +0100)]
tree: fix type used for testing the tree

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 977cb54f941c423eddbdc95c76fb41fde31f8afc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoupdate for 1.0.7
Michael Niedermayer [Mon, 13 May 2013 23:37:16 +0000 (01:37 +0200)]
update for 1.0.7

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/cdgraphics: check buffer size before use
Michael Niedermayer [Tue, 7 May 2013 19:04:33 +0000 (21:04 +0200)]
avcodec/cdgraphics: check buffer size before use

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ad002e1a13a8df934bd6cb2c84175a4780ab8942)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agosanm: Check dimensions before use
Michael Niedermayer [Tue, 7 May 2013 19:58:27 +0000 (21:58 +0200)]
sanm: Check dimensions before use

Fixes integer overflow and out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9dd04f6d8cdd1c10c28b2cb4252c1a41df581915)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agocmdutils: avtool -> fftool
Clément Bœsch [Sun, 31 Mar 2013 12:49:14 +0000 (14:49 +0200)]
cmdutils: avtool -> fftool
(cherry picked from commit 7d8ad6c1fa11ec548fc63427656989e0e7c6af8b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/intfloat_readwrite: include common.h for isinf()
Michael Niedermayer [Wed, 17 Apr 2013 21:16:05 +0000 (23:16 +0200)]
avutil/intfloat_readwrite: include common.h for isinf()

Solution based on rational.c, which uses isinf() too

This should fix compilation with msvc

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c25224737cba4079602c447c344cb54b81430ce4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/intfloat_readwrite: avoid comparission with INFINITY, use isinf()
Michael Niedermayer [Wed, 17 Apr 2013 18:40:56 +0000 (20:40 +0200)]
avutil/intfloat_readwrite: avoid comparission with INFINITY, use isinf()

Should fix pgc warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cc6f848dba89a6dc89b840cc2e1942cc3007c2a3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/log: Fix context pointer used for get_category()
Michael Niedermayer [Tue, 30 Apr 2013 18:05:31 +0000 (20:05 +0200)]
avutil/log: Fix context pointer used for get_category()

Fixes calling a random pointer

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7edb984dd051b6919d7d8471c70499273f31b0fa)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agovmdav: Try to fix unpack_rle()
Michael Niedermayer [Wed, 1 May 2013 21:46:38 +0000 (23:46 +0200)]
vmdav: Try to fix unpack_rle()

This fixes out of array accesses
The code prior to this commit could not have worked, thus obviously
was untested. I was also not able to find a valid sample that uses this
code.
This fix is thus only based on the description of the format

If someone has a sample that uses unpack_rle(), please mail me.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c1f2c4c3b49277d65b71ccdd3b6b2878f1b593eb)

Conflicts:

libavcodec/vmdav.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0baa0a5a02e16ef097ed9f72bc8a7d7b585c7652)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agommvideo/mm_decode_intra: check horizontal coordinate too
Michael Niedermayer [Thu, 2 May 2013 20:06:03 +0000 (22:06 +0200)]
mmvideo/mm_decode_intra: check horizontal coordinate too

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ae2132ac90f02330b0988e6e26ee0d53e41cd196)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agommvideo/mm_decode_inter: check horizontal coordinate too
Michael Niedermayer [Thu, 2 May 2013 19:52:08 +0000 (21:52 +0200)]
mmvideo/mm_decode_inter: check horizontal coordinate too

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8d3c99e825317b7efda5fd12e69896b47c700303)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agomjpegdec: fix overlapping memcpy with upscale_v
Michael Niedermayer [Tue, 16 Apr 2013 17:53:24 +0000 (19:53 +0200)]
mjpegdec: fix overlapping memcpy with upscale_v

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b39fd7d63648442c20671c3e4b357268ec5c49f2)

Conflicts:

libavcodec/mjpegdec.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mpegvideo: Fix edge emu with lowres
Michael Niedermayer [Tue, 7 May 2013 23:18:56 +0000 (01:18 +0200)]
avcodec/mpegvideo: Fix edge emu with lowres

Fixes a few green artifacts at the top
Fixes rest of Ticket 2535

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c67bca2b5a94efb8fb3c2ba2c7d9b1b413468838)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mpegvideo: Fix block height for lowres 3 interlaced blocks
Michael Niedermayer [Tue, 7 May 2013 23:17:45 +0000 (01:17 +0200)]
avcodec/mpegvideo: Fix block height for lowres 3 interlaced blocks

Fixes green trash
Fixes part of Ticket2535

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bca50e5cd52240d885afeb3edb0fa2c74b352add)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/lcldec: Check that dimensions are a multiple of the subsample factors
Michael Niedermayer [Mon, 13 May 2013 16:09:04 +0000 (18:09 +0200)]
avcodec/lcldec: Check that dimensions are a multiple of the subsample factors

Other dimensions would not work correctly currently,
also ask for a sample for files that fail this check.

This fixes an integer overflow leading to out of array
accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1e00bbb10cbde3da03a1e744265ce6def9ae4c56)

Conflicts:

libavcodec/lcldec.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agosrc_movie: fix scanf string
Michael Niedermayer [Sat, 4 May 2013 22:56:39 +0000 (00:56 +0200)]
src_movie: fix scanf string

Fixes out of array accesses

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit adaa7743f5fdca0c0aca0b7ffdebf61c7d868571)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoxbmdec: fix off by one error in scanf()
Michael Niedermayer [Sat, 4 May 2013 22:23:13 +0000 (00:23 +0200)]
xbmdec: fix off by one error in scanf()

Fixes out of array access

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoFix heap-buffer-overflow in matroska_parse_block
Dale Curtis [Tue, 26 Mar 2013 21:12:30 +0000 (14:12 -0700)]
Fix heap-buffer-overflow in matroska_parse_block

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 81e85bc95cb1e4f8cc7b1ba71ec027c8791b55d1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoDo not read strd chunk in avi files as H264 extradata.
Carl Eugen Hoyos [Mon, 13 May 2013 10:39:44 +0000 (12:39 +0200)]
Do not read strd chunk in avi files as H264 extradata.

Fixes ticket #2561.
(cherry picked from commit 231b3317184790b6be4b4619d96fd328f13aeabb)

4 years agomatroska: set "done" only during resync fail.
Reimar Döffinger [Sun, 5 May 2013 07:46:37 +0000 (09:46 +0200)]
matroska: set "done" only during resync fail.

Fixes playback of test7.mkv validation test file.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 762d4335aec2e5299a06bfbce15d21336af19464)

4 years agoFix type of shared flac table ff_flac_blocksize_table[].
Carl Eugen Hoyos [Sun, 5 May 2013 17:29:00 +0000 (19:29 +0200)]
Fix type of shared flac table ff_flac_blocksize_table[].

Fixes ticket #2533.
(cherry picked from commit a07ac1f7888fd08e42da2bed0421e74f1cfac177)

4 years agovf_idet: fix free after use
Michael Niedermayer [Wed, 10 Oct 2012 22:47:15 +0000 (00:47 +0200)]
vf_idet: fix free after use

Fixes ticket #2449

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cac749a551b2a068ff4636b3d42ccb8cce46c256)

4 years agoSkip padding in an id3 tag in aiff files.
Carl Eugen Hoyos [Wed, 3 Apr 2013 13:45:46 +0000 (15:45 +0200)]
Skip padding in an id3 tag in aiff files.

Fixes ticket #2430.

Reviewed-by: Matthieu Bouron
(cherry picked from commit db2d3a90825025b2f5da85792e1df33280c61391)

Conflicts:
libavformat/aiffdec.c

4 years agosmacker: fix off by one error
Paul B Mahol [Wed, 3 Apr 2013 12:57:58 +0000 (12:57 +0000)]
smacker: fix off by one error

Regression since a93b572ae4f517ce0c35cf085167c318e9215908.

Fixes #2426.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit e3cc92a623a6ece42816c7a692c8815688a99ab0)

4 years agoWrite broken aac frames to mov files instead of skipping them.
Carl Eugen Hoyos [Sat, 30 Mar 2013 07:41:46 +0000 (08:41 +0100)]
Write broken aac frames to mov files instead of skipping them.

Fixes decoding with picky media players.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b448c0a68d0cc7dfef736267dfdaed0e213c020b)

4 years agoOnly test the first frame for missing aac_adtstoasc bistream filter.
Carl Eugen Hoyos [Tue, 26 Mar 2013 14:16:07 +0000 (15:16 +0100)]
Only test the first frame for missing aac_adtstoasc bistream filter.

Many players ignore broken aac frames, so don't abort mov or flv
muxing when encountering one, just print a warning instead.

Fixes ticket #2380.
(cherry picked from commit 1741fece7073f51efdd837a4f307ea2cdf3d1cfb)

4 years agoh264: fix parsing of old lossless profile (profile_idc == 144)
Hendrik Leppkes [Sun, 14 Oct 2012 08:03:07 +0000 (10:03 +0200)]
h264: fix parsing of old lossless profile (profile_idc == 144)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 572781b25f98f99f2255404810ac33168bf28482)

4 years agoupdate the current year n1.0.6
Michael Niedermayer [Thu, 21 Mar 2013 00:10:47 +0000 (01:10 +0100)]
update the current year

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMAINTAINERS: mention that people are welcome to pick up and maintain older releases
Michael Niedermayer [Thu, 14 Mar 2013 13:50:42 +0000 (14:50 +0100)]
MAINTAINERS: mention that people are welcome to pick up and maintain older releases

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7e1efeb5707ec0fec000d42fa9f2861bab97bd8f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMAINTAINERS: update for 1.2
Michael Niedermayer [Fri, 8 Mar 2013 13:45:26 +0000 (14:45 +0100)]
MAINTAINERS: update for 1.2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 80f91a70be5f03fc95eb89d222d760eeaf91b135)

Conflicts:

MAINTAINERS

4 years agodpxenc: fix data offset
ArnoB [Thu, 14 Mar 2013 17:35:55 +0000 (18:35 +0100)]
dpxenc: fix data offset

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 361319d0f49475bc14c744194870f9bab78a8a83)

Conflicts:

tests/ref/lavf/dpx

4 years agormdec: flush audio packet on seeking
Michael Niedermayer [Sun, 17 Mar 2013 23:00:02 +0000 (00:00 +0100)]
rmdec: flush audio packet on seeking

Fixes Ticket1605

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 519ebb5ee5b89b8ecc80b4a4540fcbeb65cda172)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoupdate for 1.0.6
Michael Niedermayer [Wed, 20 Mar 2013 19:53:30 +0000 (20:53 +0100)]
update for 1.0.6

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agomatroska: fix missing ,
Andrea3000 [Thu, 21 Feb 2013 21:24:26 +0000 (22:24 +0100)]
matroska: fix missing ,

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8d8c59480e1bbffb290b0790a7af378447c7f1fd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ef688e742557863152e76c7a1f5735fa6e4b0332)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavfi/avf_concat: fix invalid exclusive test.
Nicolas George [Wed, 17 Oct 2012 17:54:22 +0000 (19:54 +0200)]
lavfi/avf_concat: fix invalid exclusive test.

The invalid test did not cause any actual problem since
the first branch is only possible with bogus filters.

Fix coverity issue CID 733850.
(cherry picked from commit 709628aa71f24520553eb10b0cf6d56784e6c3ec)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agodoc/ffmpeg: remove non ascii char
Michael Niedermayer [Wed, 27 Feb 2013 15:08:41 +0000 (16:08 +0100)]
doc/ffmpeg: remove non ascii char

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cdbaaa4f001ef8043760c44c2062fbc27facffd2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoSlight bug building ffmpeg-1.1.3 on OSX + patch to fix
David Favor [Wed, 27 Feb 2013 14:19:14 +0000 (08:19 -0600)]
Slight bug building ffmpeg-1.1.3 on OSX + patch to fix

Two instances of non-ascii characters have crept into file
doc/filters.texi which causes pod2man to error out and
break the build.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d4d1f32e48d92edc69c69b14f8e642e519f7c9af)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoiff: fix integer overflow
Michael Niedermayer [Tue, 5 Mar 2013 00:35:28 +0000 (01:35 +0100)]
iff: fix integer overflow

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3dbc0ff9c3e6f6e0d08ea3d42cb33761bae084ba)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agomsrledec: fix output_end checks
Michael Niedermayer [Tue, 5 Mar 2013 01:19:12 +0000 (02:19 +0100)]
msrledec: fix output_end checks

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e398990eb87785e20e065cd3f14d1dbb69df4392)

Conflicts:

libavcodec/msrledec.c

4 years agomsrledec: merge switches
Michael Niedermayer [Wed, 30 Jan 2013 15:41:33 +0000 (16:41 +0100)]
msrledec: merge switches

More speedup and fixes 'may be used uninitialized in this function' warnings

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d2e0a276d593ded94401e687f60bee266f3e725e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agomsrledec: move loop into switch
Michael Niedermayer [Wed, 30 Jan 2013 15:39:35 +0000 (16:39 +0100)]
msrledec: move loop into switch

speeds up code and allows more simplifications

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dbaae33c2c71862b8eaea978ed6dccc5ec03db89)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agomsrledec: move output pointer test up
Michael Niedermayer [Wed, 30 Jan 2013 15:33:45 +0000 (16:33 +0100)]
msrledec: move output pointer test up

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c2992b705381e082e33633e62e151887da67b285)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agomp3dec: Fix VBR bit rate parsing
Alexander Kojevnikov [Wed, 27 Feb 2013 05:47:11 +0000 (21:47 -0800)]
mp3dec: Fix VBR bit rate parsing

When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag.

When parsing the stream, don't override the bit rate if it's already set,
otherwise calculate the mean bit rate from parsed frames. This way, the bit
rate will be set correctly both for CBR and VBR streams.

Signed-off-by: Alexander Kojevnikov <alexander@kojevnikov.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 29d8cd265a536063420afe78375b2176a9e1abc5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoDo not (re-)set libx264 parameter b_tff if interlaced encoding was not requested.
Carl Eugen Hoyos [Sat, 16 Mar 2013 19:13:44 +0000 (20:13 +0100)]
Do not (re-)set libx264 parameter b_tff if interlaced encoding was not requested.

Reconfiguring can break x264 lossless encoding.

Fixes ticket #2165.
(cherry picked from commit 75c7e4583f4fd727d236a12763a265502fe00988)

4 years agoaacsbr: Check for envelope scalefactors overflowing
Michael Niedermayer [Fri, 8 Mar 2013 13:00:22 +0000 (14:00 +0100)]
aacsbr: Check for envelope scalefactors overflowing

This prevents various values from becoming stuck at NAN and
output to become silent
If someone knows a cleaner solution, thats welcome!

Fixes Ticket2335

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8978c743fb1d1f5a0d6dbdd83ff05817f8a41230)

4 years agopsymodel: dont apply lowpass filters with a cutoff close to the nyquist
Michael Niedermayer [Thu, 7 Mar 2013 18:28:30 +0000 (19:28 +0100)]
psymodel: dont apply lowpass filters with a cutoff close to the nyquist

The IIR filter numerically diverges in such cases, this could easily be
fixed but would make the filter slower on some platforms

Fixes Ticket2246

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fee5da6b0a79bed9dc849f216b6da1e03132b668)

4 years agoavformat: Fix apics with aac
Michael Niedermayer [Thu, 7 Mar 2013 12:55:43 +0000 (13:55 +0100)]
avformat: Fix apics with aac

Fixes Ticket2318

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cada996528422907b8b818e99029a8e3b97cf08d)

4 years agohls: fix timebase
Michael Niedermayer [Thu, 7 Mar 2013 12:42:12 +0000 (13:42 +0100)]
hls: fix timebase

Fixes Ticket1733

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a12a618aa9c6d84ec3c01695fb5aec9796453a6d)

4 years agortmpproto: increase APP_MAX_LENGTH n1.0.5
Michael Niedermayer [Sat, 23 Feb 2013 16:24:15 +0000 (17:24 +0100)]
rtmpproto: increase APP_MAX_LENGTH

Fixes second part of Ticket2292

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit da8ef5ac2f1b14f4fe34db72af5d5f8b3c8e2ff9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoupdate for 1.0.5
Michael Niedermayer [Sun, 3 Mar 2013 23:01:57 +0000 (00:01 +0100)]
update for 1.0.5

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agortmpproto: Check APP_MAX_LENGTH
Michael Niedermayer [Sat, 23 Feb 2013 15:58:01 +0000 (16:58 +0100)]
rtmpproto: Check APP_MAX_LENGTH

Fixes Ticket2292

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 02ac3398eb52679301028c2fd3ebad1b6261b4da)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoh264: check that luma and chroma depth match
Michael Niedermayer [Thu, 21 Feb 2013 14:00:59 +0000 (15:00 +0100)]
h264: check that luma and chroma depth match

Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bdeb61ccc67911cfc5e20c7cfb1312d0501ca90a)

Conflicts:

libavcodec/h264_ps.c

4 years agoavcodec_decode_audio4: check got_frame_ptr before handling initial skip
Michael Niedermayer [Thu, 21 Feb 2013 21:00:19 +0000 (22:00 +0100)]
avcodec_decode_audio4: check got_frame_ptr before handling initial skip

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8a6449167a6da8cb747cfe3502ae86ffaac2ed48)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswr: check channel layouts before using them.
Michael Niedermayer [Wed, 13 Feb 2013 16:49:16 +0000 (17:49 +0100)]
swr: check channel layouts before using them.

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 21cd905cd44a4bbafe8631bbaa6021d328413ce5)

Conflicts:

libswresample/swresample.c

4 years agoshorten: dont leave invalid channel counts in the context.
Michael Niedermayer [Wed, 13 Feb 2013 00:03:30 +0000 (01:03 +0100)]
shorten: dont leave invalid channel counts in the context.

Fixes freeing invalid addresses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4f1279154ee9baf2078241bf5619774970d18b25)

Conflicts:

libavcodec/shorten.c

4 years agotiff: Check buffer allocation and pointer increment more carefully in shorts2str...
Michael Niedermayer [Tue, 12 Feb 2013 22:40:24 +0000 (23:40 +0100)]
tiff: Check buffer allocation and pointer increment more carefully in shorts2str() and double2str()

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e1219cdaf9fb4bc8cea410e1caf802373c1bfe51)

Conflicts:

libavcodec/tiff.c

4 years agopngdec/filter: dont access out of array elements at the end
Michael Niedermayer [Tue, 12 Feb 2013 18:53:40 +0000 (19:53 +0100)]
pngdec/filter: dont access out of array elements at the end

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1ac0fa50eff30d413206cffa5f47f7fe6d4849b1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agosanm: Use the correct height variable in the decoded_size checks
Michael Niedermayer [Tue, 12 Feb 2013 01:03:28 +0000 (02:03 +0100)]
sanm: Use the correct height variable in the decoded_size checks

Fixes integer overflow and out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5260edee7e5bd975837696c8c8c1a80eb2fbd7c1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agosanm: add forgotten check for decoded_size in old_codec37()
Michael Niedermayer [Tue, 12 Feb 2013 00:09:03 +0000 (01:09 +0100)]
sanm: add forgotten check for decoded_size in old_codec37()

Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 365270aec5c2b9284230abc702b11168818f14cf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoRequire at least three frames to autodetect loas.
Carl Eugen Hoyos [Sat, 2 Feb 2013 21:36:25 +0000 (22:36 +0100)]
Require at least three frames to autodetect loas.
(cherry picked from commit a60530e3ee1d9532c026a52b03661f88e163d647)

4 years agolavf/avio: check for : in filenames for protocols.
Nicolas George [Wed, 27 Feb 2013 18:19:15 +0000 (19:19 +0100)]
lavf/avio: check for : in filenames for protocols.

If the first "special" character in a filename is a comma,
it can introduce protocol options, but only if there is a
colon at the end. Otherwise, it is just a filename with a
comma.

Fix trac ticket #2303.
(cherry picked from commit d9fad53f4b447db1e436dcf3fc4a57e604616e6c)

4 years agolavc/bink: Chech for malloc failure
James Almer [Wed, 6 Feb 2013 01:34:29 +0000 (22:34 -0300)]
lavc/bink: Chech for malloc failure

Based on commit 8ab2173ed141aa2c3336be7f9880340dfb8dcf5e

4 years agolatmenc: Check for LOAS sync word
James Almer [Wed, 16 Jan 2013 21:27:14 +0000 (18:27 -0300)]
latmenc: Check for LOAS sync word

Write the packet unaltered if found.

Fixes ticket #1917

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b454c64e0311d813fef9c22cf34f83c2ce77ab23)

4 years agodoc/APIchanges: List merge commit hashes and version numbers
Michael Niedermayer [Wed, 13 Feb 2013 02:32:23 +0000 (03:32 +0100)]
doc/APIchanges: List merge commit hashes and version numbers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoapichanges: fix 2 wrong hashes
Michael Niedermayer [Thu, 14 Feb 2013 20:13:32 +0000 (21:13 +0100)]
apichanges: fix 2 wrong hashes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2f3bc5122822687dc388f7352c92cf6db456cf7c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoapichanges: Use , instead of / to seperate multiple hashes
Michael Niedermayer [Thu, 14 Feb 2013 19:34:10 +0000 (20:34 +0100)]
apichanges: Use , instead of / to seperate multiple hashes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 33d6330652c088dadde163da569b1a2f6c7603c0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoapichanges: fix date
Michael Niedermayer [Thu, 14 Feb 2013 19:32:24 +0000 (20:32 +0100)]
apichanges: fix date

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ad6802f975a91bf6757fe3729ef8c6f10e6796b7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agodoc/APIchanges: fix odd .01 versions
Michael Niedermayer [Thu, 14 Feb 2013 02:31:31 +0000 (03:31 +0100)]
doc/APIchanges: fix odd .01 versions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9f16cb9e50a5a196af9244dc7d33ed193227528a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoaac: reconfigure output on pop
Michael Niedermayer [Fri, 22 Feb 2013 16:33:22 +0000 (17:33 +0100)]
aac: reconfigure output on pop

Fixes Ticket1918

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6f77122bf5712da1d860a0ad7174181fd0bcffd9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoconfigure: Make warnings from -Wreturn-type fatal errors
Diego Biurrun [Mon, 14 Jan 2013 19:38:33 +0000 (20:38 +0100)]
configure: Make warnings from -Wreturn-type fatal errors

These warnings have no false positives and point to serious bugs.
(cherry picked from commit 99853cb8d4237b810b2fffb4a34f66fd0064ef72)

Conflicts:

configure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agomovenc: hotfix, dont store fiel for h264 / mpeg4-asp / dnxhd
Michael Niedermayer [Thu, 14 Feb 2013 16:11:34 +0000 (17:11 +0100)]
movenc: hotfix, dont store fiel for h264 / mpeg4-asp / dnxhd

Other software does not store it in this case, and the information
is provided by the codec stream

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 405cc0d9052079307b2b4188c396ae30c8e9108b)

Conflicts:

tests/ref/fate/vsynth1-mpeg4
tests/ref/fate/vsynth2-mpeg4
tests/ref/lavf/mov
tests/ref/seek/lavf_mov
tests/ref/vsynth/vsynth1-dnxhd-1080i
tests/ref/vsynth/vsynth2-dnxhd-1080i

4 years agoh264: Detect POC inconsistencies and try to handle them reasonably
Michael Niedermayer [Sat, 22 Dec 2012 17:02:48 +0000 (18:02 +0100)]
h264: Detect POC inconsistencies and try to handle them reasonably

Improves the file from Ticket2050

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 985aa0be828da073d765a8c1dbb38efad43891ed)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoFix bits_per_coded_sample when encoding png with frame-level multithreading.
Carl Eugen Hoyos [Wed, 20 Feb 2013 21:54:21 +0000 (22:54 +0100)]
Fix bits_per_coded_sample when encoding png with frame-level multithreading.

Fixes ticket #2290.
(cherry picked from commit c4dc6c4c86a052b7ba53fa7ae0c1b0643ad70d0b)

Conflicts:
libavcodec/pngenc.c

4 years agoRevert "swfenc: use av_get_audio_frame_duration() instead of AVCodecContext.frame_size"
Carl Eugen Hoyos [Sun, 17 Feb 2013 18:56:09 +0000 (19:56 +0100)]
Revert "swfenc: use av_get_audio_frame_duration() instead of AVCodecContext.frame_size"

This reverts commit 620b88a302d522f71a6a95aff500cf7bd8520043.

Fixes ticket #2272.

Conflicts:
libavformat/swfenc.c
(cherry picked from commit 8d0757e1079f588ed69f629e2d1a4d5f232dc298)

4 years agoWrite the fiel atom to mov files independently of the used video coded.
Carl Eugen Hoyos [Thu, 14 Feb 2013 14:23:51 +0000 (15:23 +0100)]
Write the fiel atom to mov files independently of the used video coded.

The QuickTime specification does not contain any hint that the atom
must not be written in some cases and both the QuickTime and the
AVID decoders do not fail if the atom is present.

This change allows to signal (visually) interlaced streams with
a codec different from uncompressed video.

As a side-effect, this fixes ticket #2202
(cherry picked from commit 7d0e3b197c817b307d599a23704a44763ed0bbdd)

Conflicts:
tests/ref/fate/vsynth1-avui
tests/ref/fate/vsynth1-dnxhd-1080i
tests/ref/fate/vsynth1-mpeg4
tests/ref/fate/vsynth2-avui
tests/ref/fate/vsynth2-dnxhd-1080i
tests/ref/fate/vsynth2-mpeg4
tests/ref/lavf/mov
tests/ref/seek/lavf_mov

4 years agosws: dont write out of array on bigendian
Carl Eugen Hoyos [Thu, 14 Feb 2013 13:39:21 +0000 (14:39 +0100)]
sws: dont write out of array on bigendian

Fixes Ticket2229

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4e2c63685e031e28d2296cff76473b963ee62ba1)

4 years agoh264: Reset last_pocs in case of reference or frame number inconsistencies
Michael Niedermayer [Wed, 13 Feb 2013 21:36:07 +0000 (22:36 +0100)]
h264: Reset last_pocs in case of reference or frame number inconsistencies

This prevents faulty increasing of has_b_frames
Should fix Ticket 2062

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c230af9bccc3cadb373f9007ba14fffb6c2acc75)

4 years agoh264_refs: Print default in case we are missing a reference.
Michael Niedermayer [Sun, 11 Nov 2012 01:47:38 +0000 (02:47 +0100)]
h264_refs: Print default in case we are missing a reference.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a39d36146a40cb52b3560fd02c73eccf72603b8f)

4 years agoupdate for 1.0.4 n1.0.4
Michael Niedermayer [Thu, 7 Feb 2013 00:24:35 +0000 (01:24 +0100)]
update for 1.0.4

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoh264: Only apply error concealment if theres a frame
Michael Niedermayer [Sun, 20 Jan 2013 14:03:13 +0000 (15:03 +0100)]
h264: Only apply error concealment if theres a frame

Without any correctly decoded slices, there can be no frame.

Fixes out of array reads

Found-by: Rafaël Carré
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 60af6c3138dc501a647bc69b374d5d33d5d86ab5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoaacdec: check channel count
Michael Niedermayer [Sun, 27 Jan 2013 19:37:27 +0000 (20:37 +0100)]
aacdec: check channel count

Prevent out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 96f452ac647dae33c53c242ef3266b65a9beafb6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agovqavideo: check chunk sizes before reading chunks
Michael Niedermayer [Fri, 25 Jan 2013 05:11:59 +0000 (06:11 +0100)]
vqavideo: check chunk sizes before reading chunks

Fixes out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ab6c9332bfa1e20127a16392a0b85a4aa4840889)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agosanm: Check decoded_size.
Michael Niedermayer [Wed, 23 Jan 2013 23:27:10 +0000 (00:27 +0100)]
sanm: Check decoded_size.

This prevents a buffer overflow in rle_decode()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7357ca900efcf829de4cce4cec6ddc286526d417)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec_decode_audio: do not trust the channel layout, use the channel count.
Michael Niedermayer [Fri, 18 Jan 2013 00:28:44 +0000 (01:28 +0100)]
avcodec_decode_audio: do not trust the channel layout, use the channel count.

Fixes memory corruption

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d270c3202539e8364c46410e15f7570800e33343)

Conflicts:

libavcodec/utils.c

4 years agoerror_concealment: Check that the picture is not in a half setup state.
Michael Niedermayer [Fri, 11 Jan 2013 03:44:20 +0000 (04:44 +0100)]
error_concealment: Check that the picture is not in a half setup state.

Fixes state becoming inconsistent
Fixes a null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 23318a57358358e7a4dc551e830e4503f0638cfe)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoatrac3dec: Check coding mode against channels.
Michael Niedermayer [Fri, 9 Nov 2012 12:26:20 +0000 (13:26 +0100)]
atrac3dec: Check coding mode against channels.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 13451f5520ce6b0afde861b2285dda659f8d4fb4)

Conflicts:

libavcodec/atrac3.c

4 years agoalsdec: check block length
Michael Niedermayer [Wed, 12 Dec 2012 11:28:45 +0000 (12:28 +0100)]
alsdec: check block length

Fix writing over the end

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0ceca269b66ec12a23bf0907bd2c220513cdbf16)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoadpcm: fix off by 1 error and out of array access in DK4
Michael Niedermayer [Wed, 12 Dec 2012 16:14:32 +0000 (17:14 +0100)]
adpcm: fix off by 1 error and out of array access in DK4

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f18c873ab5ee3c78d00fdcc2582b39c133faecb4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agohuffyuvdec: Skip len==0 cases
Michael Niedermayer [Tue, 29 Jan 2013 18:22:33 +0000 (19:22 +0100)]
huffyuvdec: Skip len==0 cases

Fixes vlc decoding for hypothetical files that would contain such cases.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0dfc01c2bbf4b71bb56201bc4a393321e15d1b31)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agohuffyuvdec: Check init_vlc() return codes.
Michael Niedermayer [Tue, 29 Jan 2013 17:29:41 +0000 (18:29 +0100)]
huffyuvdec: Check init_vlc() return codes.

Prevents out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f67a0d115254461649470452058fa3c28c0df294)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agortmp: fix buffer overflows in ff_amf_tag_contents()
Xi Wang [Wed, 23 Jan 2013 02:40:05 +0000 (21:40 -0500)]
rtmp: fix buffer overflows in ff_amf_tag_contents()

A negative `size' will bypass FFMIN().  In the subsequent memcpy() call,
`size' will be considered as a large positive value, leading to a buffer
overflow.

Change the type of `size' to unsigned int to avoid buffer overflow, and
simplify overflow checks accordingly.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4e692374f7962ea358c329de38c380103f8991b6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agortmp: fix multiple broken overflow checks
Xi Wang [Tue, 22 Jan 2013 22:49:29 +0000 (17:49 -0500)]
rtmp: fix multiple broken overflow checks

Sanity checks like `data + size >= data_end || data + size < data' are
broken, because `data + size < data' assumes pointer overflow, which is
undefined behavior in C.  Many compilers such as gcc/clang optimize such
checks away.

Use `size < 0 || size >= data_end - data' instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 902cfe2f74d777a7dc20ac68f2393b9f84b790c1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agortpenc: fix overflow checking in avc_mp4_find_startcode()
Xi Wang [Wed, 23 Jan 2013 01:58:07 +0000 (20:58 -0500)]
rtpenc: fix overflow checking in avc_mp4_find_startcode()

The check `start + res < start' is broken since pointer overflow is
undefined behavior in C.  Many compilers such as gcc/clang optimize
away this check.

Use `res > end - start' instead.  Also change `res' to unsigned int
to avoid signed left-shift overflow.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2f014567cfd63e58156f60666f1a61ba147276ab)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agosanm: check image dimensions before using them
Michael Niedermayer [Tue, 22 Jan 2013 20:30:20 +0000 (21:30 +0100)]
sanm: check image dimensions before using them

Avoids integer overflows and out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 49b729d3af8464de431362e6c5b3027102bc2f88)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavf/mov: skip version and flags attributes in mov_read_chan function
Matthieu Bouron [Mon, 4 Feb 2013 21:06:11 +0000 (22:06 +0100)]
lavf/mov: skip version and flags attributes in mov_read_chan function

Fixes ticket #1764.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 59d40fc7e66e6ebb2d89e25115492bfe13b07d95)

4 years agoffmpeg: dont allow -flags to override -pass
Michael Niedermayer [Wed, 6 Feb 2013 00:25:52 +0000 (01:25 +0100)]
ffmpeg: dont allow -flags to override -pass

Fixes Ticket2154

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ccf9dd00da055e94117b56cead4af80ff331b00e)

4 years agodvenc: dont fail hard if the timecode is invalid
Michael Niedermayer [Tue, 5 Feb 2013 21:57:35 +0000 (22:57 +0100)]
dvenc: dont fail hard if the timecode is invalid

Instead just dont store the timecode
Fixes Ticket2187

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f0eacbc760c8b27c2064cea5395e32971853c73c)

4 years agomovtextenc: fix pointer messup and out of array accesses
Michael Niedermayer [Tue, 5 Feb 2013 20:54:02 +0000 (21:54 +0100)]
movtextenc: fix pointer messup and out of array accesses

Fixes Ticket2213

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b0635e2fcf80717dd618ef75d3317d62ed85c300)

4 years agoDo not change codec in flv streams if the user has forced a codec.
Carl Eugen Hoyos [Fri, 1 Feb 2013 22:27:15 +0000 (23:27 +0100)]
Do not change codec in flv streams if the user has forced a codec.

Fixes ticket #2218.
(cherry picked from commit 6a50e8a190bc1329fd3e76e8497bb7f870b6e69b)