Commit Graph

29199 Commits

Author SHA1 Message Date
Laurent Aimar
54a178f28f Fixed size given to init_get_bits().
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
(cherry picked from commit b59efc94347ccf0cbc2ff14a5a9e99819c5bdc4d)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Michael Niedermayer
78cd2e18a4 smacker: fix a few off by 1 errors
stereo & 16bit is untested due to lack of samples

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Laurent Aimar
0d93b03e68 Check for invalid VLC value in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 6489455495fc5bfbebcfe3f57e5d4fdd6a781091)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Laurent Aimar
5b1f79b092 Check and propagate errors when VLC trees cannot be built in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 9676ffba8346791f494451e68d2a3b37a2918a9b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Laurent Aimar
9f391c4971 Fixed off by one packet size allocation in the smacker demuxer.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit a92d0fa5d234582583d41b67dddecffc2c819573)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Laurent Aimar
4e7905fa9e Check for invalid packet size in the smacker demuxer.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit e055932f5636a82275837968eea9c8fcb5bca474)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Laurent Aimar
4ee014309c ape demuxer: fix segfault on memory allocation failure.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 273aab99bf7be2bcda95dd64101c2317ee0fcb99)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Alex Converse
61ddc8271d xan: Add some buffer checks
(cherry picked from commit 0872bb23b4bd2d94a8ba91070f706d1bc1c3ced8)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Laurent Aimar
e6694dce1c Fixed size given to init_get_bits() in xan decoder.
(cherry picked from commit 393d5031c6aaaf8c2dda4eb5d676974c349fae85)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Kostya Shishkov
0b9b3570a3 smacker demuxer: handle possible av_realloc() failure.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 47a8589f7bc69d1a29da1dfdfbd0dfa78a9e31fd)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Laurent Aimar
9b30b7b9bf Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 8bfea4ab4e)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Alex Converse
384ed15c2a cljr: init_get_bits size in bits instead of bytes
(cherry picked from commit 0c1f5b93d9)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:32 +02:00
Alex Converse
6550e2b5c5 indeo2: fail if input buffer too small
(cherry picked from commit b7ce4f1d1c3add86ece7ca595ea6c4a10b471055)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:31 +02:00
Alex Converse
af32fa929a indeo2: init_get_bits size in bits instead of bytes
(cherry picked from commit 68ca330cbd)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:31 +02:00
Laurent Aimar
07b3c4cde5 ffv1: Fixed size given to init_get_bits() in decoder.
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
(cherry picked from commit 46b004959b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:31 +02:00
Alex Converse
5d4c065476 wavpack: Check error codes rather than working around error conditions.
(cherry picked from commit dba2b63a98)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:31 +02:00
Laurent Aimar
4b84e995ad Fixed invalid access in wavpack decoder on corrupted bitstream.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 55354b7de2)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:31 +02:00
Laurent Aimar
685940da4c Fixed invalid writes in wavpack decoder on corrupted bitstreams.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 0aedab0340)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:31 +02:00
Laurent Aimar
aee461277a Fixed invalid access in wavpack decoder on corrupted extra bits sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit beefafda63)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:31 +02:00
Anton Khirnov
a4f2973b2d lavc: fix type for thread_type option
It should be flags, not int.
(cherry picked from commit fb47997edb)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:31 +02:00
Anton Khirnov
54f12d2889 AVOptions: fix av_set_string3() doxy to match reality.
Fixes bug 28.
(cherry picked from commit e955a682e1)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:31 +02:00
Sean McGovern
1cf3ba8971 cpu detection: avoid a signed overflow
1<<31 overflows because 1 is signed, so force it to unsigned.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 5938e02185)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:31 +02:00
Michael Niedermayer
2b74db8d27 vf_scale: don't leak SWS context.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 52982dbe47)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:31 +02:00
Alberto Delmás
db5e27f94e VC1: Fix first/last row checks with slices
In some places 0/mb_height were used in place of start_mb_y/end_mb_y.

Fixes SA00049, SA00058, SA10091, SA10097, SA10131, SA20021, SA30030

Improves PSNR in SA00054, SA00059, SA00060, SA10096, SA10098, SA20022,
SA30031, SA30032, SA40012, SA40013

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 1cf82cab08)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Ronald S. Bultje
97ce2a29b6 vc1: properly zero coded_block[] edges on new slice entry.
Previously, we would leave the left edge uninitialized, which led to
CBP prediction errors on slice edges, e.g. in SA10098.vc1.
(cherry picked from commit d4b9974465)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Jeff Downs
ce8f40a7b9 h264: fix PCM intra-coded blocks in monochrome case
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 6581e161c5)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Jeff Downs
45b3f7c71e h264: correct implicit weight table computation for long ref pics
Correct computation of implicit weight tables when referencing pictures
that are marked for long reference.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 87cf70eb23)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Jeff Downs
8ad6555f82 h264: correct the check for invalid long term frame index in MMCO decode
The current check on MMCO parameters prohibits a "max long term frame index
plus 1" of 16 (frame idx of 15) for the "set max long term frame index" MMCO.
Fix this off-by-one error to allow the full range of legal values.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 29a09eae9a)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Alex Converse
b4099a6dc5 aac: Only output configure if audio was found.
Audio found is not triggered on a CCE because a CCE alone has no output.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit d8425ed4af)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Kostya Shishkov
dec458b900 rv10/20: tell decoder to use edge emulation
This removes out-of-edge motion compensation artifacts (easily spotted green
blocks in avplay, gray blocks in transcoding), for example here:
http://samples.libav.org/samples/real/tv_watching_t1.rm

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 331971116d)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Luca Barbato
fe3e7297fe flvenc: use int64_t to store offsets
Metadata currently is written only at the start of the file in normal
cases, when transcoding from a rtmp source metadata could be
written later and the offset recorded can exceed 32bit.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 7f5bf4fbaf)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Reimar Döffinger
28321b777f VC-1: fix reading of custom PAR.
Custom PAR num/denum are in 1-256 range.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 0e86965514)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Dustin Brody
59a22afa0b h264: notice memory allocation failure
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit bac3ab13ea)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Justin Ruggles
042934e786 Remove incorrect info in documentation of AVCodecContext.bits_per_raw_sample.
bits_per_raw_sample is used in video as well, where sample_fmt is not used.
(cherry picked from commit d271d5b215)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Baptiste Coudurier
67163d751b libx264: do not set pic quality if no frame is output
Avoids uninitialized reads.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 5caa2de19e)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Alex Converse
96a453eb85 aac: Remove some suspicious illegal memcpy()s from LTP.
(cherry picked from commit a6c49f18ab)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Alex Converse
c613a89143 mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata.
This prevents out of bounds reads when extradata is being decoded.
(cherry picked from commit 1f6f58d585)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Ronald S. Bultje
b3b97559bb vp3/theora: flush after seek.
(cherry picked from commit 8dcf518430)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Diego Biurrun
44c718cf71 rv30: return AVERROR(EINVAL) instead of EINVAL
On some platforms EINVAL could be positive, ensure we return negative values.
(cherry picked from commit e5985185d2)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Mans Rullgard
99ec59adbd Fix incorrect max_lowres values
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e23a05ab06)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Rafaël Carré
3ed12b97be Do not decode RV30 files if the extradata is too small
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 289c60001f)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Mans Rullgard
f7831bb104 aacps: skip some memcpy() if src and dst would be equal
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e5902d60ce)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Anton Khirnov
9c2a024660 lavf: fix segfault in av_open_input_stream()
ic is NULL in case of error.
(cherry picked from commit 13551ad1e3)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Oskar Arvidsson
f8521560fa pix_fmt: Fix number of bits per component in yuv444p9be
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e59d6b4d72)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Jindrich Makovicka
b772a757dd mpegts: fix Continuity Counter error detection
According to MPEG-TS specs, the continuity_counter shall not be
incremented when the adaptation_field_control of the packet
equals '00' or '10'.

Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 8923cfa328)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Justin Ruggles
0c039db4d8 alsa: limit buffer_size to 32768 frames.
In testing, the file output plugin gave a max buffer size of about 20 million
frames, which is way more than what is really needed and causes a memory
allocation error on my system.
(cherry picked from commit e35c674d13)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Justin Ruggles
6ed533f561 alsa: fallback to buffer_size/4 for period_size.
buffer_size/4 is the value used by aplay. This fixes output to null
devices, e.g. writing ALSA output to a file.
(cherry picked from commit 8bfd7f6a47)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Tomas Härdin
c75ba07f6e gxf: Fix 25 fps DV material in GXF being misdetected as 50 fps
Set DV packet durations using fields_per_frame.
This requires turning gxf_stream_info into the demuxer's context for access to the value in gxf_packet().
Since MPEG-2 seems to work fine this done only for DV.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 99fecc64b0)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Anton Khirnov
9417761474 Revert "ffmpeg: get rid of useless AVInputStream.nb_streams."
This reverts commit 2cf8355f98.
AVInputStream.nb_streams tracks number of streams found at the
beginning, new streams may appear that ffmpeg doesn't know about. Fixes
crash in this case.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Alex Converse
6107543d4e adts: Fix PCE copying.
Parse the extension flag bit when reading the MPEG4 AudioSpecificConfig.

This has nothing to do with SBR/PS contradictory to what was noted when it was removed.
(cherry picked from commit 7f01a4192c)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00