19298 Commits

Author SHA1 Message Date
Michael Niedermayer
1934bb7536 h264: skip error concealment when SPS and slices are mismatching
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 695af8eed642ff0104834495652d1ee784a4c14d)

Conflicts:

	libavcodec/h264.c
2013-08-25 21:05:59 +02:00
Michael Niedermayer
39ed544262 Merge commit '072be3e8969f24113d599444be4d6a0ed04a6602'
* commit '072be3e8969f24113d599444be4d6a0ed04a6602':
  h264: set parameters from SPS whenever it changes

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b9d887c225466576ae80ef7f2b109e866ff137b2)

Conflicts:

	libavcodec/h264.c
2013-08-25 14:49:11 +02:00
Michael Niedermayer
f9e6fb50ce jpeg2000: check log2_cblk dimensions
Fixes out of array access
Fixes Ticket2895

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9a271a9368eaabf99e6c2046103acb33957e63b7)

Conflicts:

	libavcodec/jpeg2000dec.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-25 13:11:53 +02:00
Michael Niedermayer
453e2f1528 avcodec/rpza: Perform pointer advance and checks before using the pointers
Fixes out of array accesses
Fixes Ticket2850

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-24 15:17:49 +02:00
Michael Niedermayer
b25c3063b2 avcodec/flashsv: check diff_start/height
Fixes out of array accesses
Fixes Ticket2844

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-24 15:17:49 +02:00
Michael Niedermayer
29b14db916 update all trac links to use the trac subdomain
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-24 15:17:48 +02:00
Michael Niedermayer
d94d383f13 xbmdec: fix off by one error in scanf()
Fixes out of array access

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-24 15:17:48 +02:00
Michael Niedermayer
2a8c3a7895 avcodec/kmvc: fix MV checks
Fixes Ticket2813
Fixes regression since 70b5583

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3cd8aaa2b2e78faf039691e1c31ff4f8d94e3bc6)
2013-07-31 03:03:05 +02:00
Michael Niedermayer
c9f34c8260 mpeg12dec: avoid reinitialization on PS changes when possible.
Fixes Ticket2574

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

Conflicts:
	libavcodec/mpeg12dec.c
2013-07-09 00:48:42 +02:00
Hendrik Leppkes
274ec187dc mathops/x86: work around inline asm miscompilation with GCC 4.8.1
The volatile is not required here, and prevents a miscompilation with GCC
4.8.1 when building on x86 with --cpu=i686

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 659df32a9d8984081ccd54adc3aee7daeb33388d)
2013-06-24 08:48:31 +02:00
Michael Niedermayer
7a472e0da9 alacenc: Fix missing sign_extend()
Fixes ticket #2497

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8aea2f05dc56f7e7d60767dd27ba8e846a05e8ae)
2013-06-13 00:11:02 +02:00
Claudio Freire
f6bca606f1 AAC encoder: Fix rate control on twoloop.
Fixes a case where multichannel bitrate isn't accurately
targetted by psy model alone, never achieving the target bitrate.
Now fixed.

Fixes ticket #2625.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
2013-06-02 16:30:15 +02:00
Michael Niedermayer
5fd83f29f7 h264_cavlc: fix reading skip run
Fixes Ticket2606

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

Conflicts:
	libavcodec/h264_cavlc.c
2013-05-30 23:22:00 +02:00
Michael Niedermayer
1b0028a3c5 smacker: remove av_clip_int16()
Fixes Ticket2425

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2211c76287e073a9e176fde7dbb9a63ceb2af8d1)
2013-05-21 00:03:44 +02:00
Carl Eugen Hoyos
7dd042e657 Fix type of shared flac table ff_flac_blocksize_table[].
Fixes ticket #2533.
(cherry picked from commit a07ac1f7888fd08e42da2bed0421e74f1cfac177)
2013-05-05 20:39:45 +02:00
Michael Niedermayer
fff5f65540 Merge remote-tracking branch 'jamrial/release/0.11' into release/0.11
* jamrial/release/0.11:
  lavc/bink: Chech for malloc failure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:10:40 +01:00
Alexander Kojevnikov
7cb24ecd4c 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)

Conflicts:

	tests/ref/lavf-fate/mp3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:02:28 +01:00
Michael Niedermayer
864a7e73b9 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>
(cherry picked from commit 5ff41ffeb4cb9ea6df49757dc859619dc3d3ab4f)

Conflicts:

	libavcodec/huffyuv.c
2013-03-20 22:02:28 +01:00
Michael Niedermayer
562aa82d2a 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>
(cherry picked from commit 95ab8d33e1a680f30a5a9605175112008ab81afc)

Conflicts:

	libavcodec/huffyuv.c
2013-03-20 22:02:28 +01:00
James Almer
c095137d1b lavc/bink: Chech for malloc failure
Based on commit 8ab2173ed141aa2c3336be7f9880340dfb8dcf5e
2013-03-20 17:51:15 -03:00
Carl Eugen Hoyos
b63dbe2220 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)
2013-03-18 02:19:13 +01:00
Michael Niedermayer
5df2dc0f94 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)
2013-03-08 20:09:20 +01:00
Michael Niedermayer
ebe645f02b 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)
2013-02-14 09:24:11 +01:00
Michael Niedermayer
470ee0c660 h264_refs: Print default in case we are missing a reference.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a39d36146a40cb52b3560fd02c73eccf72603b8f)
2013-02-14 09:24:08 +01:00
Piotr Bandurski
d338632e9f tiffdec: Use the correct height field.
Fixes Ticket913

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4784a135b2b0fe4d1b4c6256bd37265fc45aed3d)
2013-01-07 00:29:28 +01:00
Clément Bœsch
8bc0127b3d lavc/ass_split: check for NULL pointer in ff_ass_split_override_codes().
This is consistent with the other ff_ass_split_* functions.

It also fixes a crash when trying to split a dialog with text=NULL
(which seems to happen when the text of the dialog is empty); basically,
this commit fixes crashes when trying to encode an empty text subtitle
dialog (see subrip and mov_text encoders).

Fixes Ticket2048.
(cherry picked from commit c83002a4f8042ccfa0688a9a18e8fa0369c1fda8)
2013-01-01 18:19:50 +01:00
Michael Niedermayer
5f0e5b4048 mpeg1video: fix regression with slices != threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a01679586cd9ac8470b81c0299fc7e13fd980d64)
2012-12-13 00:21:18 +01:00
Michael Niedermayer
e9ded2e1a9 mpeg1video: support multi threaded slice encoding.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 03df9720168335482f00898fc16b56ff4878d0e7)

Conflicts:
	libavcodec/mpeg12enc.c
2012-12-13 00:21:09 +01:00
Janne Grunau
69cc119d64 h264: slice-mt: get last_pic_dropable from master context
Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .
(cherry picked from commit 24c62ea7a5df44804be88150aa0c45e6796b5da9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 16:44:49 +01:00
Michael Niedermayer
54ac3d10d1 mp3dec: Fix possibly exploitable crash
I was sadly unable to find a non fuzzed mp3 that uses the
feature that contained the bug (and i searched hard ...), thus
while this fixes the security issue. It may or may not fix
mixed blocks in 8khz mp3s, i cant say due to lack of samples to test.

Security issue exists since: b37d945dd4213cb8e92146571b0374cd45d52286

Reported-by: Dale Curtis <dalecurtis@google.com>
(Probably) Found-by: inferno@chromium.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 94041febc53a6da10e34c2bfff9ff1d580fdce60)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 16:28:27 +01:00
Paul B Mahol
99dbda3008 aasc: fix out of array write
Closes #1619.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:21:58 +02:00
Michael Niedermayer
d721cb009d bmv_videodec: fix out of array read
Fixes Ticket1373

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:21:22 +02:00
Michael Niedermayer
55b3e408fa faxcompr: fix out of array read
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5891e454a667e42ef71a06bfd9661540ea3f3ebd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:20:38 +02:00
Michael Niedermayer
9f1e01c991 escape124: fix integer overflow leading to excessive memory allocation
Fixes Ticket1629

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:18:39 +02:00
Michael Niedermayer
450e4b1a60 sp5xdec: fix off by 1 error causing a crash
Fixes Ticket1633

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f0896a6bd94e5b45447c7d640c8e8aa95d860d7a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:16:27 +02:00
Michael Niedermayer
3581ab6ce0 mpegaudio_parser: reset state to prevent it to be random
Fixes Ticket1718

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:15:35 +02:00
Ben Jackson
f1ec792ae3 pthread: Avoid crashes/odd behavior caused by spurious wakeups
pthread_wait_cond can wake up for no reason (Wikipedia: Spurious_wakeup).
The FF_THREAD_SLICE thread mechanism could spontaneously execute jobs or
allow the caller of avctx->execute to return before all jobs were complete.
This adds tests to both cases to ensure the wakeup is real.

Signed-off-by: Ben Jackson <ben@ben.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e3329474a366de066b25e86f35f5abf9c5a4b7b2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:15:02 +02:00
Ronald S. Bultje
b45a8f6d24 dxva2: include dxva.h if found
Apparently, some build environments require dxva.h even for dxva2,
while others lack this header entirely.  Including it conditionally
allows building in both cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit fa84506177f0246b30d4ea6a99ee5d419f3e4550)

Conflicts:

	configure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-13 04:46:50 +02:00
Michael Niedermayer
a19010f7a6 wmaenc: dont mess with the bitrate.
The bitrate is not writeable by an encoder.
Fixes generation of invalid wma

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-02 13:29:41 +02:00
Michael Niedermayer
5c2ffa2ce7 mpegvideo: fix out of heap array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 317ca0d3f735fad354c404e8bbac3e1ce9f09b12)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Michael Niedermayer
6be8e44c00 search_for_quantizers_faac: fix curband
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 33775c3507f4e0977d8ef1d8c5cbd167d0429319)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Carl Eugen Hoyos
e1c9434424 Make H264 reorder buffer size message less verbose.
(cherry picked from commit a3bc7f916dcc69cfa439b424352d5951b4eaf9b8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Carl Eugen Hoyos
b4294e2319 Fix MP2 muxer Makefile dependencies.
Found, analysed and tested by trac user Jamal.

Fixes ticket #1411
(cherry picked from commit 757d5b9bfda45e45d9ab28ad4d5a9205119fe549)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Kostya Shishkov
7d97936495 mpc8: fix maximum bands handling
In Musepack SV8 codec property tell the maximum nonzero band, but every
frame codes maximum band as a limit (i.e. strictly less than given value).
Synthesis also expects maximum nonzero band, so there's a need to convert
frame maximum band limit value.
(cherry picked from commit b56825c40ee1329b33aed34ff8a639fa18d263a0)

Conflicts:

	libavcodec/mpc8.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Alex Converse
f9fc08de65 aacdec: Turn PS off when switching to stereo and turn it to implicit when switching to mono.
(cherry picked from commit 79c8e29a7e404dbcf670df599fad6894f98ccab2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Carl Eugen Hoyos
31d3b3b5d5 Fix compilation condition for some ProRes dsp encoder functions.
Found, analysed and tested by trac user Jamal.

Fixes part of Ticket #1404.
(cherry picked from commit 568a5924180b0ce43e2706bf2491b70c455eb36a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Carl Eugen Hoyos
706809adb2 Fix compilation condition for some ProRes dsp decoder functions.
Found, analysed and tested by trac user Jamal.

Fixes part of Ticket #1404.
(cherry picked from commit 84986b4e61994c64ef2ea6161c473f82a2672cbc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Carl Eugen Hoyos
4e66ca5f37 Fix ProRes decoder Makefile dependencies.
Found, analysed and tested by trac user Jamal.

Fixes part of Ticket #1404.
(cherry picked from commit a4b885d55ee061fa8df089f356ddbabf0282da5f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Carl Eugen Hoyos
530ce76a05 Fix G.723.1 encoder Makefile dependencies.
(cherry picked from commit c02ef0788178d859f829c9703325e247b60e1895)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:26 +02:00
Michael Niedermayer
0e74b21427 ffv1dec: print more information for -debug 1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 38c9ebd2a97a1298e4c5cc9d01d88d69c55be695)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 00:55:25 +02:00