ffmpeg.git
7 years agows_snd: decode to AV_SAMPLE_FMT_U8 instead of S16.
Justin Ruggles [Mon, 12 Sep 2011 12:55:43 +0000 (08:55 -0400)]
ws_snd: decode to AV_SAMPLE_FMT_U8 instead of S16.

8-bit unsigned is the native sample format.
(cherry picked from commit 2322ced8da990835717a176b8d2c32961cfecd3e)

7 years agoflacdec: fix buffer size checking in get_metadata_size()
Justin Ruggles [Tue, 13 Sep 2011 19:13:44 +0000 (15:13 -0400)]
flacdec: fix buffer size checking in get_metadata_size()

Adds an additional check before reading the next block header and avoids a
potential integer overflow when checking the metadata size against the
remaining buffer size.
(cherry picked from commit 4c5e7b27d57dd2be777780e840eef9be63242158)

7 years agoFix a buffer overflow in libx264 interface to x264 encoder. Previous code ignored...
Mike Scheutzow [Mon, 26 Sep 2011 14:57:53 +0000 (10:57 -0400)]
Fix a buffer overflow in libx264 interface to x264 encoder. Previous code ignored the compressed buffer size passed in. This change returns as many complete NALs as can fit in the buffer, and logs an error message.

Signed-off-by: Mike Scheutzow <mike.scheutzow@alcatel-lucent.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e2dae1faa84ada5746ac2114de7eb68abd824131)

7 years agolibaac+ support
tipok [Mon, 26 Sep 2011 00:28:21 +0000 (02:28 +0200)]
libaac+ support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoCheck for out of bound bands limit in mpc v8 decoder.
Laurent Aimar [Sun, 25 Sep 2011 11:43:38 +0000 (13:43 +0200)]
Check for out of bound bands limit in mpc v8 decoder.

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

7 years agoFix return value on EOF in mpc v8 demuxer.
Laurent Aimar [Sun, 25 Sep 2011 11:43:37 +0000 (13:43 +0200)]
Fix return value on EOF in mpc v8 demuxer.

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

7 years agoh264: ff_h264_decode_extradata: check buffer args
Alexander Strasser [Sat, 24 Sep 2011 16:00:16 +0000 (18:00 +0200)]
h264: ff_h264_decode_extradata: check buffer args

  The buffer size and pointer were not checked prior to testing the first
byte of the buffer. These were sometimes checked before calling, but it is
better to add it inside the function as it takes buf and size arguments.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
(cherry picked from commit 715f259bf949b06df1b5ed0307606dc258754c99)

7 years agoCompile x86/swscale_template with -mno-red-zone.
Reimar Döffinger [Wed, 21 Sep 2011 17:10:58 +0000 (19:10 +0200)]
Compile x86/swscale_template with -mno-red-zone.

Replaces a very hackish hack to fix the same issue (call instruction
overwriting stack variables).

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

7 years agoffmpeg: increase bit_buffer_size, the header size is clearly too small for rgb48...
Michael Niedermayer [Sun, 25 Sep 2011 14:13:07 +0000 (16:13 +0200)]
ffmpeg: increase bit_buffer_size, the header size is clearly too small for rgb48 raw based formats

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

7 years agoAdd av_calloc() helper.
Laurent Aimar [Sat, 24 Sep 2011 16:39:13 +0000 (18:39 +0200)]
Add av_calloc() helper.

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

7 years agoFix potential pointer arithmetic overflows in rle_unpack() of vmd video decoder.
Laurent Aimar [Sat, 24 Sep 2011 22:08:51 +0000 (00:08 +0200)]
Fix potential pointer arithmetic overflows in rle_unpack() of vmd video decoder.

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

7 years agoFix out of bound reads in rle_unpack() of vmd video decoder.
Laurent Aimar [Sat, 24 Sep 2011 22:08:50 +0000 (00:08 +0200)]
Fix out of bound reads in rle_unpack() of vmd video decoder.

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

7 years agoCheck for out of bound reads in vmd_decode() of vmd video decoder.
Laurent Aimar [Sat, 24 Sep 2011 22:08:49 +0000 (00:08 +0200)]
Check for out of bound reads in vmd_decode() of vmd video decoder.

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

7 years agoFix potential pointer arithmetic overflows in lz_unpack of vmd video decoder.
Laurent Aimar [Sat, 24 Sep 2011 21:52:24 +0000 (23:52 +0200)]
Fix potential pointer arithmetic overflows in lz_unpack of vmd video decoder.

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

7 years agoPrevent out of bound read in lz_unpack in vmd video decoder.
Laurent Aimar [Sat, 24 Sep 2011 21:52:23 +0000 (23:52 +0200)]
Prevent out of bound read in lz_unpack in vmd video decoder.

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

7 years agoPrevent NULL dereferences when the previous frame is missing in vmd video decoder.
Laurent Aimar [Sat, 24 Sep 2011 21:16:19 +0000 (23:16 +0200)]
Prevent NULL dereferences when the previous frame is missing in vmd video decoder.

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

7 years agoCheck for invalid update parameters in vmd video decoder.
Laurent Aimar [Sat, 24 Sep 2011 21:16:18 +0000 (23:16 +0200)]
Check for invalid update parameters in vmd video decoder.

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

7 years agoFix potential overread in vmd audio decoder.
Laurent Aimar [Sat, 24 Sep 2011 21:16:17 +0000 (23:16 +0200)]
Fix potential overread in vmd audio decoder.

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

7 years agovp56:Fix error recovery code on size changes in vp5/6 decoder
Laurent Aimar [Sat, 24 Sep 2011 14:16:40 +0000 (16:16 +0200)]
vp56:Fix error recovery code on size changes in vp5/6 decoder

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

7 years agovp6:Reset the internal state when aborting key frames header parsing in vp6 decoder.
Laurent Aimar [Sat, 24 Sep 2011 14:19:25 +0000 (16:19 +0200)]
vp6:Reset the internal state when aborting key frames header parsing in vp6 decoder.
It prevents leaving the state only half initialized.

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

7 years agoh264: pass buffer & size to ff_h264_decode_extradata()
Michael Niedermayer [Fri, 23 Sep 2011 03:42:45 +0000 (05:42 +0200)]
h264: pass buffer & size to ff_h264_decode_extradata()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: Check for out of bounds reads in ff_h264_decode_extradata().
Laurent Aimar [Sat, 24 Sep 2011 14:44:14 +0000 (16:44 +0200)]
h264: Check for out of bounds reads in ff_h264_decode_extradata().

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

7 years agofft: avoid a signed overflow
Sean McGovern [Tue, 20 Sep 2011 01:32:09 +0000 (21:32 -0400)]
fft: avoid a signed overflow

As a signed integer, 1<<31 overflows, so force it to unsigned.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotiffenc: initialize forgotten avctx.
Jean First [Fri, 23 Sep 2011 21:39:51 +0000 (23:39 +0200)]
tiffenc: initialize forgotten avctx.
(cherry picked from commit f7e797aa5c987c39b55666a2d41877ef2aec40bc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotiffenc: Add forgotten avclass to context.
Jean First [Fri, 23 Sep 2011 21:39:26 +0000 (23:39 +0200)]
tiffenc: Add forgotten avclass to context.
(cherry picked from commit 43c481e56929789883f5b078e0e86d50fcc0025e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoaacsbr: add a assert0 to check for a inconsistency that
Michael Niedermayer [Fri, 23 Sep 2011 20:30:27 +0000 (22:30 +0200)]
aacsbr: add a assert0 to check for a inconsistency that
occurd during debug. I dont know if this can happen normally but if so
it would be quite bad.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopsxstr: improve probe to not misdetect so much.
Michael Niedermayer [Fri, 23 Sep 2011 17:01:12 +0000 (19:01 +0200)]
psxstr: improve probe to not misdetect so much.
The score of 50 can probably be raised if needed
Fixes Ticket490

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

7 years agolavf/utils: only complain about aspect missmatch when the difference is "meassureable"
Michael Niedermayer [Thu, 22 Sep 2011 16:17:28 +0000 (18:17 +0200)]
lavf/utils: only complain about aspect missmatch when the difference is "meassureable"

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

7 years agompeg4videoenc: remove forgotten return -1
Michael Niedermayer [Thu, 22 Sep 2011 16:16:57 +0000 (18:16 +0200)]
mpeg4videoenc: remove forgotten return -1

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

7 years agompeg4videoenc: guess a good aspect when we cant store the exact one.
Michael Niedermayer [Thu, 22 Sep 2011 12:08:39 +0000 (14:08 +0200)]
mpeg4videoenc: guess a good aspect when we cant store the exact one.

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

7 years agoavformat_free_context: favor av_freep()
Michael Niedermayer [Fri, 30 Sep 2011 23:29:30 +0000 (01:29 +0200)]
avformat_free_context: favor av_freep()

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

7 years agompegvideo: increase emu edge buffer size
Michael Niedermayer [Fri, 30 Sep 2011 22:58:01 +0000 (00:58 +0200)]
mpegvideo: increase emu edge buffer size
This fixes a crash with 422 H.264

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

7 years agoh264: fix FIXME and use list_count in ff_h264_fill_mbaff_ref_list()
Michael Niedermayer [Wed, 28 Sep 2011 20:24:05 +0000 (22:24 +0200)]
h264: fix FIXME and use list_count in ff_h264_fill_mbaff_ref_list()

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

7 years agoh264: More correct ref_count check in decode_slice_header()
Michael Niedermayer [Wed, 28 Sep 2011 20:22:56 +0000 (22:22 +0200)]
h264: More correct ref_count check in decode_slice_header()

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

7 years agoFix segfault in save_bits:
Sascha Sommer [Sat, 24 Sep 2011 18:56:41 +0000 (20:56 +0200)]
Fix segfault in save_bits:
use put_bits_count to get the buffer fill state instead of
num_saved_bits as num_saved_bits is sometimes reset when
frames are lost
(Ticket 495)
(cherry picked from commit 780d45473c32fa356c8ce385c3ea4692567c3228)

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

7 years agoupdate version numbers for 0.8.4 n0.8.4
Michael Niedermayer [Thu, 22 Sep 2011 00:29:11 +0000 (02:29 +0200)]
update version numbers for 0.8.4

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovp6: partially propagate huffman tree building errors during coeff model parsing...
Dustin Brody [Tue, 16 Aug 2011 20:46:34 +0000 (16:46 -0400)]
vp6: partially propagate huffman tree building errors during coeff model parsing and fix misspelling

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoCheck for huffman tree building error in vp6 decoder.
Laurent Aimar [Wed, 21 Sep 2011 18:46:32 +0000 (20:46 +0200)]
Check for huffman tree building error in vp6 decoder.

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

7 years agoRelease old pictures after a resolution change in vp5/6 decoder
Laurent Aimar [Wed, 21 Sep 2011 18:46:33 +0000 (20:46 +0200)]
Release old pictures after a resolution change in vp5/6 decoder

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

7 years agoCheck for missing reference in vp5/6 decoder.
Laurent Aimar [Wed, 21 Sep 2011 18:46:30 +0000 (20:46 +0200)]
Check for missing reference in vp5/6 decoder.

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

7 years agoCheck for invalid slices offsets in RV30/40 decoder.
Laurent Aimar [Wed, 21 Sep 2011 18:46:31 +0000 (20:46 +0200)]
Check for invalid slices offsets in RV30/40 decoder.

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

7 years agoCheck output buffer size in nellymoser decoder.
Laurent Aimar [Wed, 21 Sep 2011 18:46:29 +0000 (20:46 +0200)]
Check output buffer size in nellymoser decoder.

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

7 years agoMerge remote-tracking branch 'khirnov/release/0.7' into release/0.8
Michael Niedermayer [Wed, 21 Sep 2011 23:10:24 +0000 (01:10 +0200)]
Merge remote-tracking branch 'khirnov/release/0.7' into release/0.8

* khirnov/release/0.7: (64 commits)
  rv34: Check for invalid slice offsets
  rv34: Fix potential overreads
  rv34: Avoid NULL dereference on corrupted bitstream
  rv10: Reject slices that does not have the same type as the first one
  lavf: Fix context pointer in av_open_input_stream when avformat_open_input fails
  oggdec: fix out of bound write in the ogg demuxer
  Fixed size given to init_get_bits().
  smacker: fix a few off by 1 errors
  Check for invalid VLC value in smacker decoder.
  Check and propagate errors when VLC trees cannot be built in smacker decoder.
  Fixed off by one packet size allocation in the smacker demuxer.
  Check for invalid packet size in the smacker demuxer.
  ape demuxer: fix segfault on memory allocation failure.
  xan: Add some buffer checks (cherry picked from commit 0872bb23b4bd2d94a8ba91070f706d1bc1c3ced8)
  Fixed size given to init_get_bits() in xan decoder. (cherry picked from commit 393d5031c6aaaf8c2dda4eb5d676974c349fae85)
  smacker demuxer: handle possible av_realloc() failure.
  Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
  cljr: init_get_bits size in bits instead of bytes (cherry picked from commit 0c1f5b93d9b97c4cc3684ba91a040e90bfc760d2)
  indeo2: fail if input buffer too small (cherry picked from commit b7ce4f1d1c3add86ece7ca595ea6c4a10b471055)
  indeo2: init_get_bits size in bits instead of bytes (cherry picked from commit 68ca330cbd479111db9cb7649d7530ad59f04cc8)
  ...

Conflicts:
ffmpeg.c
libavdevice/alsa-audio.h
libavformat/gxf.c
libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoHack around gcc 4.6 breaking asm using call.
Reimar Döffinger [Sun, 28 Aug 2011 19:14:13 +0000 (21:14 +0200)]
Hack around gcc 4.6 breaking asm using call.

gcc 4.6 no longer decrements esp to account for local variables.
Thus using call will end up overwriting some local variable.
So add an extra one it can safely clobber.
This is a huge hack because it's basically pure chance it works,
no idea how this is supposed to be done.

Fixes trac ticket #397.

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

7 years agoFix dxva2 decoding for some H264 samples.
Carl Eugen Hoyos [Wed, 21 Sep 2011 21:47:34 +0000 (23:47 +0200)]
Fix dxva2 decoding for some H264 samples.

7 years agomp3demux: pass on error code on packet read.
Michael Niedermayer [Tue, 20 Sep 2011 22:51:53 +0000 (00:51 +0200)]
mp3demux: pass on error code on packet read.

Reported-by: Tanami, Ohad
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c83442b0571370b946d3f8bb85c46879d62ab10a)

7 years agoCheck for invalid slice offsets in real decoder.
Laurent Aimar [Mon, 19 Sep 2011 20:48:53 +0000 (22:48 +0200)]
Check for invalid slice offsets in real decoder.

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

7 years agormdec: Reject invalid deinterleaving parameters
Laurent Aimar [Fri, 16 Sep 2011 22:05:13 +0000 (00:05 +0200)]
rmdec: Reject invalid deinterleaving parameters

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoUse deinterleavers for demangling audio packets in RealMedia.
Kostya Shishkov [Sat, 13 Aug 2011 19:02:54 +0000 (21:02 +0200)]
Use deinterleavers for demangling audio packets in RealMedia.

Unlike other containers RealMedia stores its audio packets in scrambled form,
with interleaver ID preceeding audio codec ID. Currently deinterleaving
decision is tied to the codec while it's possible to have non-default
deinterleaver with audio codec (like Int0 deinterleaver instead of specific
one for Sipro).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agorv10: Reject slices that does not have the same type as the first one
Laurent Aimar [Sat, 17 Sep 2011 22:03:08 +0000 (00:03 +0200)]
rv10: Reject slices that does not have the same type as the first one

This prevents crashes with some corrupted bitstreams.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agormdec: use the deinterleaving mode and not the codec when creating audio packets.
Laurent Aimar [Sat, 17 Sep 2011 21:17:45 +0000 (21:17 +0000)]
rmdec: use the deinterleaving mode and not the codec when creating audio packets.

It prevents crashes due to non initialized fields.

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

7 years agoMAINTAINERS: add my GPG fingerprint.
Gwenole Beauchesne [Mon, 19 Sep 2011 14:57:10 +0000 (16:57 +0200)]
MAINTAINERS: add my GPG fingerprint.
(cherry picked from commit 7882dc10f871bf25a848fe62a152f63814f9c7d1)

7 years agoSupport 3IVD in isom, produced by 3ivx DivX Doctor.
Carl Eugen Hoyos [Mon, 19 Sep 2011 10:20:42 +0000 (12:20 +0200)]
Support 3IVD in isom, produced by 3ivx DivX Doctor.

Fixes ticket #486.
(cherry picked from commit 4a9b069b6742f78ed7511d2a87af621ab1d43a59)

7 years agompegpsdec: fix reading first mpegps packet
Arne de Bruijn [Sat, 17 Sep 2011 12:59:00 +0000 (14:59 +0200)]
mpegpsdec: fix reading first mpegps packet
(cherry picked from commit b2f230e23dd61112ac090b0c059d87b5f6bcb307)

7 years agoAvoid NULL dereference on corrupted bitstream with real decoder.
Laurent Aimar [Sat, 17 Sep 2011 21:43:58 +0000 (23:43 +0200)]
Avoid NULL dereference on corrupted bitstream with real decoder.

rv34_decode_slice() can return without allocating any pictures.

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

7 years agoReject slices that does not have the same type than the first one in RV10/RV20 decoder.
Laurent Aimar [Sat, 17 Sep 2011 22:17:44 +0000 (00:17 +0200)]
Reject slices that does not have the same type than the first one in RV10/RV20 decoder.

This prevents crashes with some corrupted bitstreams.

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

7 years agocheck all svq3_get_ue_golomb() returns.
Michael Niedermayer [Sat, 17 Sep 2011 19:53:21 +0000 (21:53 +0200)]
check all svq3_get_ue_golomb() returns.

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

7 years agorv34: check for size mismatch
Michael Niedermayer [Sat, 17 Sep 2011 17:40:25 +0000 (19:40 +0200)]
rv34: check for size mismatch

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

7 years agoReject audio tracks with invalid interleaver parameters in RM demuxer.
Laurent Aimar [Sat, 17 Sep 2011 14:56:33 +0000 (16:56 +0200)]
Reject audio tracks with invalid interleaver parameters in RM demuxer.

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

7 years agoFix js_vlc_bits value validation when joint stereo is used in cook decoder.
Laurent Aimar [Sat, 17 Sep 2011 14:56:35 +0000 (16:56 +0200)]
Fix js_vlc_bits value validation when joint stereo is used in cook decoder.

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

7 years agoFix potential overreads in rv34 decoder.
Laurent Aimar [Sat, 17 Sep 2011 14:56:30 +0000 (16:56 +0200)]
Fix potential overreads in rv34 decoder.

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

7 years agoCorrect determination of file size and frames in VBRI headers
Ingo Brückl [Thu, 15 Sep 2011 14:19:05 +0000 (16:19 +0200)]
Correct determination of 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>
(cherry picked from commit 5d305c9398c043f9ae3bbc6d64a3e1dc468c1e63)

7 years agoh264: allow disabling bitstream overread protection by using the fast flag.
Michael Niedermayer [Wed, 14 Sep 2011 18:48:00 +0000 (20:48 +0200)]
h264: allow disabling bitstream overread protection by using the fast flag.

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

7 years agoxan: Add some buffer checks
Alex Converse [Fri, 9 Sep 2011 23:10:03 +0000 (16:10 -0700)]
xan: Add some buffer checks
(cherry picked from commit 0872bb23b4bd2d94a8ba91070f706d1bc1c3ced8)

7 years agoxan: Remove extra trailing newline
Alex Converse [Fri, 9 Sep 2011 23:13:52 +0000 (16:13 -0700)]
xan: Remove extra trailing newline
(cherry picked from commit 350f57bd7b77b36c150540ad2aae9de42cc4dfca)

7 years agoFixed size given to init_get_bits() in xan decoder.
Laurent Aimar [Fri, 9 Sep 2011 22:32:12 +0000 (00:32 +0200)]
Fixed size given to init_get_bits() in xan decoder.
(cherry picked from commit 393d5031c6aaaf8c2dda4eb5d676974c349fae85)

7 years agolibavformat/utils: print ts in the "invalid dts/pts combination" case.
Michael Niedermayer [Tue, 13 Sep 2011 02:27:41 +0000 (04:27 +0200)]
libavformat/utils: print ts in the "invalid dts/pts combination" case.

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

7 years agovf_remove_logo: domt access vf->next->query_format() directly but use the API.
Michael Niedermayer [Tue, 13 Sep 2011 01:52:30 +0000 (03:52 +0200)]
vf_remove_logo: domt access vf->next->query_format() directly but use the API.
This fixes a crash

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

7 years agosmacker: fix a few off by 1 errors
Michael Niedermayer [Mon, 12 Sep 2011 23:14:44 +0000 (01:14 +0200)]
smacker: fix a few off by 1 errors
stereo & 16bit is untested due to lack of samples

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

7 years agosmacker: add forgotten *
Michael Niedermayer [Mon, 12 Sep 2011 21:45:21 +0000 (23:45 +0200)]
smacker: add forgotten *
found by fenrir

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

7 years agosegafilm: Fix potential division by 0 on corrupted segafilm streams in the demuxer.
Laurent Aimar [Mon, 12 Sep 2011 19:09:57 +0000 (21:09 +0200)]
segafilm: Fix potential division by 0 on corrupted segafilm streams in the demuxer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosegafilm: Check for memory allocation failures in segafilm demuxer.
Laurent Aimar [Mon, 12 Sep 2011 18:58:35 +0000 (20:58 +0200)]
segafilm: Check for memory allocation failures in segafilm demuxer.

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

7 years agorv34: check that subsequent slices have the same type as first one.
Kostya Shishkov [Mon, 12 Sep 2011 09:39:53 +0000 (11:39 +0200)]
rv34: check that subsequent slices have the same type as first one.

This prevents some crashes when corrupted bitstream reports e.g. P-type
slice in I-frame. Official RealVideo decoder demands all slices to be
of the same type too.

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

7 years agosmacker demuxer: handle possible av_realloc() failure.
Kostya Shishkov [Mon, 12 Sep 2011 07:40:42 +0000 (09:40 +0200)]
smacker demuxer: handle possible av_realloc() failure.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agogitignore: ignore .exp files, as generated by the MS linker on win32
Hendrik Leppkes [Mon, 12 Sep 2011 15:45:25 +0000 (17:45 +0200)]
gitignore: ignore .exp files, as generated by the MS linker on win32

Ignore another filetype, as generated by Microsofts lib.exe when creating the import libraries.
(cherry picked from commit 73211630110886d849e3de837ca80280a2df2b46)

7 years agormdec: Check return value of more avio_seek calls
Joakim Plate [Mon, 12 Sep 2011 02:08:06 +0000 (04:08 +0200)]
rmdec: Check return value of more avio_seek calls

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

7 years agoavidec: Check return value of more avio_seek calls
Joakim Plate [Mon, 12 Sep 2011 02:07:36 +0000 (04:07 +0200)]
avidec: Check return value of more avio_seek calls

The move of avio_seek in avi_read_seek is to avoiding modifying
state if the seek would fail.

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

7 years agoasf: Check return value of more avio_seek calls
Joakim Plate [Mon, 12 Sep 2011 02:06:55 +0000 (04:06 +0200)]
asf: Check return value of more avio_seek calls
This reduces problems when underlying protocol is not
seekable even if marked as such or if the file has been
cut short.

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

7 years agoFix writes out of bounds in the ogg demuxer.
Laurent Aimar [Sun, 11 Sep 2011 21:37:44 +0000 (23:37 +0200)]
Fix writes out of bounds in the ogg demuxer.

Between ogg_save() and ogg_restore() calls, the number of streams
could have been reduced.

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

7 years agodoc: explain __STDC_CONSTANT_MACROS in C++
Luca Barbato [Sat, 10 Sep 2011 14:23:50 +0000 (10:23 -0400)]
doc: explain __STDC_CONSTANT_MACROS in C++

In order to build C++ programs using libav you need
-D__STDC_CONSTANT_MACROS appened to the CXXFLAGS.
(cherry picked from commit d162994a81a311a8dd212a50a2d2ad2b088df97f)

7 years agogitignore: add files to git ignore generated on a win32 build
Joakim Plate [Sun, 11 Sep 2011 19:23:53 +0000 (21:23 +0200)]
gitignore: add files to git ignore generated on a win32 build

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

7 years agoFixed invalid read access on extra data in cinepak decoder.
Laurent Aimar [Sun, 11 Sep 2011 17:17:43 +0000 (19:17 +0200)]
Fixed invalid read access on extra data in cinepak decoder.

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

7 years agoFixed segfault on corrupted smacker streams in the demuxer.
Laurent Aimar [Sun, 11 Sep 2011 16:51:52 +0000 (18:51 +0200)]
Fixed segfault on corrupted smacker streams in the demuxer.

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

7 years agoFixed segfaults on corruped smacker streams in the decoder.
Laurent Aimar [Sun, 11 Sep 2011 16:54:01 +0000 (18:54 +0200)]
Fixed segfaults on corruped smacker streams in the decoder.

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

7 years agoFixed segfault on memory allocation failure in ape demuxer.
Laurent Aimar [Sun, 11 Sep 2011 17:17:40 +0000 (19:17 +0200)]
Fixed segfault on memory allocation failure in ape demuxer.

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

7 years agoh264: prevent an out of array read in decode_nal_units()
Michael Niedermayer [Sun, 11 Sep 2011 05:23:00 +0000 (07:23 +0200)]
h264: prevent an out of array read in decode_nal_units()

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

7 years agoh264dec: Prevent CABAC and CAVLC bitsteram overreading
Michael Niedermayer [Sat, 10 Sep 2011 14:28:53 +0000 (16:28 +0200)]
h264dec: Prevent CABAC and CAVLC bitsteram overreading

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

7 years agolibspeex encoder wraper
Art Clarke [Sun, 11 Sep 2011 01:14:14 +0000 (03:14 +0200)]
libspeex encoder wraper
taken from svn head of xuggle
(cherry picked from commit a52cdcd296c40882c3b4f88958990c56f0ce3019)

7 years agodvbsubdec: don't hardcode subtitle colors count in dvbsubdec to 16
Joakim Plate [Sat, 10 Sep 2011 21:12:29 +0000 (23:12 +0200)]
dvbsubdec: don't hardcode subtitle colors count in dvbsubdec to 16

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

7 years agoFixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
Laurent Aimar [Wed, 7 Sep 2011 19:43:03 +0000 (21:43 +0200)]
Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.

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

7 years agocljr: init_get_bits size in bits instead of bytes
Alex Converse [Fri, 9 Sep 2011 21:50:33 +0000 (14:50 -0700)]
cljr: init_get_bits size in bits instead of bytes
(cherry picked from commit 0c1f5b93d9b97c4cc3684ba91a040e90bfc760d2)

7 years agoindeo2: fail if input buffer too small
Alex Converse [Fri, 9 Sep 2011 20:26:49 +0000 (13:26 -0700)]
indeo2: fail if input buffer too small
(cherry picked from commit b7ce4f1d1c3add86ece7ca595ea6c4a10b471055)

7 years agoindeo2: init_get_bits size in bits instead of bytes
Alex Converse [Fri, 9 Sep 2011 20:24:19 +0000 (13:24 -0700)]
indeo2: init_get_bits size in bits instead of bytes
(cherry picked from commit 68ca330cbd479111db9cb7649d7530ad59f04cc8)

7 years agocabac test: Change input to test, so a wider range of states is tested.
Michael Niedermayer [Sat, 10 Sep 2011 17:22:39 +0000 (19:22 +0200)]
cabac test: Change input to test, so a wider range of states is tested.

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

7 years agocabac test: match encode and decode side
Michael Niedermayer [Sat, 10 Sep 2011 17:20:28 +0000 (19:20 +0200)]
cabac test: match encode and decode side

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

7 years agocabac: fix cabac encoder
Michael Niedermayer [Sat, 10 Sep 2011 17:18:41 +0000 (19:18 +0200)]
cabac: fix cabac encoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 89653ea728bd59da2b88967ad648cce685950879)

7 years agoFixed deference of NULL pointer in motionpixels decoder.
Laurent Aimar [Sat, 10 Sep 2011 11:28:13 +0000 (13:28 +0200)]
Fixed deference of NULL pointer in motionpixels decoder.

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

7 years agoavisynth: Fix upside down bug
chinshou [Sat, 10 Sep 2011 03:23:17 +0000 (05:23 +0200)]
avisynth: Fix upside down bug
(cherry picked from commit b10ba1175d3afa28d88cf3b24b69dc4882be16f5)

7 years agoavisynth: Remove wrong pts calculation.
chinshou [Sat, 10 Sep 2011 03:21:50 +0000 (05:21 +0200)]
avisynth: Remove wrong pts calculation.
Fixes Ticket428
(cherry picked from commit 4f123a7d7c8cbf425958e726689c6bdc84605e91)

7 years agoFixed size given to init_get_bits().
Laurent Aimar [Fri, 9 Sep 2011 21:46:00 +0000 (23:46 +0200)]
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: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e5e0580b93a5bda34f62a5df50c1b15e610d4ad1)