Justin Ruggles
737ca4482b
vorbisdec: read the previous window flag for long windows
...
When reading sequentially, we are using the actual flag from the previous
frame, but when seeking we do not know what the previous window flag was, so
we need to read it from the bitstream.
13 years ago
Anton Khirnov
7fb6c9225c
lavc: free the output packet when encoding failed or produced no output.
13 years ago
Anton Khirnov
e42e9b0e4d
lavc: preserve avpkt->destruct in ff_alloc_packet().
...
Also, don't bother with saving/restoring data, av_init_packet doesn't
touch it.
13 years ago
Anton Khirnov
c179c9e19d
lavc: clarify the meaning of AVCodecContext.frame_number.
13 years ago
Alex Converse
1aa708988a
mpegts: Pad the packet buffer in handle_packet().
...
This allows it to be used with get_bits without the thread of overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Alex Converse
4df369692e
mpegts: Do not call read_sl_header() when no bytes remain in the buffer.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
9d87374ec0
amrwb: remove duplicate arguments from extrapolate_isf().
...
Prevents warnings because the dst and src overlap (are the same) in the
memcpy() inside the function.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
154b8bb800
amrwb: error out early if mode is invalid.
...
Prevents using the invalid mode as an index in a static array, which
would generate invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
291c9b6285
h264: change underread for 10bit QPEL to overread.
...
This prevents us from reading before the start of the buffer, and thus
prevents crashes resulting from this behaviour. Fixes bug 237.
13 years ago
Ronald S. Bultje
9c239f6026
matroska: check buffer size for RM-style byte reordering.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
45549339bc
vp8: disable mmx functions with sse/sse2 counterparts on x86-64.
...
x86-64 is guaranteed to have at least SSE2, therefore the MMX/MMX2
functions will never be used in practice.
13 years ago
Ronald S. Bultje
bd66f073fe
vp8: change int stride to ptrdiff_t stride.
...
On 64bit platforms with 32bit int, this means we won't have to sign-
extend the integer anymore.
13 years ago
Ronald S. Bultje
349b7977e4
wma: fix invalid buffer size assumptions causing random overreads.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Mashiat Sarker Shakkhar
9d25f1f619
Windows Media Audio Lossless decoder
...
Decodes 16-bit WMA Lossless encoded files. 24-bit is not supported yet.
Bitstream parser written by Andreas Öman with contributions from
Baptiste Coudurier and Ulion.
Includes a number of bug-fixes from Benjamin Larsson, Michael Niedermayer and
Konstantin Shishkov, shine and polish by Diego Biurrun.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Alex Converse
9243ec4a50
rv10/20: Fix slice overflow with checked bitstream reader.
13 years ago
Michael Niedermayer
71db86d53b
h263dec: Disallow width/height changing with frame threads.
...
Fixes CVE-2011-3937
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Alex Converse
2f6528537f
rv10/20: Fix a buffer overread caused by losing track of the remaining buffer size.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Alex Converse
1697c29d75
rmdec: Honor .RMF tag size rather than assuming 18.
13 years ago
Martin Storsjö
b087ce2bee
g722: Fix the QMF scaling
...
This fixes clipping if the encoder input used the full 16 bit
input range (samples with a magnitude below 16383 worked fine).
The filtered subband samples should be 15 bit maximum, while
the code earlier produced them scaled to 16 bit.
This makes the decoder output have double the magnitude
compared to before.
The spec reference samples doesn't test the QMF at all, which
was why this part slipped past initially.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
56bf24ad78
r3d: don't set codec timebase.
...
It's not supposed to be set by demuxers.
Set avg_frame_rate and r_frame_rate instead.
13 years ago
Anton Khirnov
efec3bc65a
electronicarts: set timebase for tgv video.
...
The container has no timestamps and the framerate isn't stored in the
data either.
The decoder sets codec timebase to experimentally found value 1/15. Do
the same for the demuxer too, it should at least be better than the
default 1/90000.
13 years ago
Anton Khirnov
e39400c3a8
electronicarts: parse the framerate for cmv video.
13 years ago
Anton Khirnov
1bb3990b56
ogg: don't set codec timebase
...
Demuxers are not supposed to set it.
13 years ago
Anton Khirnov
1d3144c318
electronicarts: don't set codec timebase
...
Demuxers are not supposed to set it.
Set stream timebase and framerates instead (this is a cfr container with
no timestamps).
13 years ago
Anton Khirnov
10a6e0c346
avs: don't set codec timebase
...
Demuxers are not supposed to set it.
Set r_frame_rate and avg_frame_rate instead.
13 years ago
Derek Buitenhuis
f604eab30a
wavpack: Fix an integer overflow
...
Integer Overflow Checker detected an integer
overflow while FATE was running.
See: http://fate.libav.org/x86_64-linux-ioc/
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
13 years ago
Diego Biurrun
36697be187
swscale: K&R formatting cosmetics for PowerPC code (part II/II)
13 years ago
Ingo Brückl
c05e2be9a2
mp3dec: Fix reading file size and frames in VBRI headers
...
The fields "Number of Bytes" and "Number of Frames" are mixed up. "Bytes"
come first, "Frames" behind.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Diego Biurrun
1c4717be4f
mjpegdec: use correct variable in av_log invocation
...
libavcodec/mjpegdec.c:1463: warning: format ‘%x’ expects type ‘unsigned int’, but argument 5 has type ‘const uint8_t *’
13 years ago
Diego Biurrun
75c553eb26
rmdec: adjust printf format string specifier to fix warning
...
libavformat/rmdec.c:383: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘int64_t’
13 years ago
Diego Biurrun
324deaa268
Replace AVFrame pointer type punning by proper struct member assignments.
13 years ago
Diego Biurrun
47c0ac96aa
Replace AVFrame pointer casts by proper struct member accesses.
13 years ago
Diego Biurrun
562b6c744a
Remove unnecessary AVFrame pointer casts.
13 years ago
Diego Biurrun
2f4b476e04
msmpeg4: Split encoding backend code off from general backend code.
13 years ago
Anton Khirnov
eb727387fd
lavc: shrink encoded video packet size after encoding.
...
Based on a patch by Nicolas George <nicolas.george <at> normalesup.org>
13 years ago
Ronald S. Bultje
0ce4fe482c
h264: error out on invalid bitdepth.
...
Fixes invalid reads while initializing the dequant tables, which uses
the bit depth to determine the QP table size.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Christophe Gisquet
cc412b7104
aacsbr: use a swap index for the Y matrix rather than copy buffers.
...
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Ronald S. Bultje
63c9de6469
huffyuv: do not abort on unknown pix_fmt; instead, return an error.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
bd17a40a7e
lcl: return negative error codes on decode_init() errors.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Martin Storsjö
984b914c55
rtpenc: Use MB info side data for splitting H263 packets for RFC 2190
...
This makes the packetization spec compliant for cases where one single
GOB doesn't fit into an RTP packet.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
bdc1220eeb
h263enc: Add an option for outputting info about MBs as side data
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
442c1320e7
avpacket: Add a function for shrinking already allocated side data
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Vitor Sessak
5cd1337f5d
nellymoserdec: Saner and faster IMDCT windowing
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Vitor Sessak
882abda5a2
amrnbdec: check frame size before decoding.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Ronald S. Bultje
8a9faf33f2
cscd: use negative error values to indicate decode_init() failures.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
d1604b3de9
h264: prevent overreads in intra PCM decoding.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Justin Ruggles
f240df6a74
FATE: do not decode audio in the nuv test.
...
We already have sufficient coverage for 16-bit pcm.
13 years ago
Justin Ruggles
929dd8c108
dxa: set audio stream time base using the sample rate
13 years ago
Justin Ruggles
aa831c4093
psx-str: do not allow seeking by bytes
13 years ago
Justin Ruggles
bdbf1fa405
asfdec: Do not set AVCodecContext.frame_size
13 years ago