ffmpeg.git
7 years agolavf: Do not compute the packet duration based on the bitrate if the frame_size can...
Michael Niedermayer [Sun, 4 Mar 2012 03:06:49 +0000 (04:06 +0100)]
lavf: Do not compute the packet duration based on the bitrate if the frame_size can be determined.

This fixes issues when the bitrate is variable or inaccurate but the
frame size has not been determined yet.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf: factor out determinable_frame_size()
Michael Niedermayer [Sun, 4 Mar 2012 03:06:15 +0000 (04:06 +0100)]
lavf: factor out determinable_frame_size()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 4 Mar 2012 01:03:25 +0000 (02:03 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  tiertexseq: set correct block_align for audio
  tiertexseq: set audio stream start time to 0
  voc/avs: Do not change the sample rate mid-stream.
  segafilm: use the sample rate as the time base for audio streams
  ea: fix audio pts
  psx-str: fix audio pts
  vqf: set packet duration
  tta demuxer: set packet duration
  mpegaudio_parser: do not ignore information from the first parsed frame
  mpegaudio_parser: be less picky about the start position
  thp: set audio packet durations
  avcodec: add a Vorbis parser to get packet duration
  vorbisdec: read the previous window flag for long windows
  lavc: free the output packet when encoding failed or produced no output.
  lavc: preserve avpkt->destruct in ff_alloc_packet().
  lavc: clarify the meaning of AVCodecContext.frame_number.
  mpegts: Pad the packet buffer in handle_packet().
  mpegts: Do not call read_sl_header() when no bytes remain in the buffer.

Conflicts:
libavcodec/mpegaudio_parser.c
libavcodec/version.h
libavformat/mpegts.c
tests/ref/fate/pva-demux

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoSupport RGBA64 as input colour space.
Carl Eugen Hoyos [Sat, 3 Mar 2012 23:43:18 +0000 (00:43 +0100)]
Support RGBA64 as input colour space.

Mostly fixes ticket #503,
opaque still overflows for RGBA64 -> RGBA conversion.

7 years agoffm options should also set discard automatically.
Rick van der Zwet [Sat, 3 Mar 2012 19:45:45 +0000 (20:45 +0100)]
ffm options should also set discard automatically.

commit 13f6917ca91dfdc0fd785235b2dae891a9604859 handles discards automatically,
but the ffm discard options are not fully parsed. Causing the input streams not
to be used, so no stream towards the ffserver after the initial probing.

Signed-off-by: Rick van der Zwet <info@rickvanderzwet.nl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agowc4: fix out of chroma LUT reads
Michael Niedermayer [Sat, 3 Mar 2012 23:13:52 +0000 (00:13 +0100)]
wc4: fix out of chroma LUT reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopcm-mpeg: Check for valid bps.
Michael Niedermayer [Sat, 3 Mar 2012 22:55:16 +0000 (23:55 +0100)]
pcm-mpeg: Check for valid bps.

The code only supports 16 and 24 bps currently, 20bps causes
out of array reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotiertexseq: set correct block_align for audio
Justin Ruggles [Fri, 20 Jan 2012 04:03:08 +0000 (23:03 -0500)]
tiertexseq: set correct block_align for audio

7 years agotiertexseq: set audio stream start time to 0
Justin Ruggles [Fri, 20 Jan 2012 04:01:53 +0000 (23:01 -0500)]
tiertexseq: set audio stream start time to 0

Update FATE test to reflect delayed video due to the file having audio-only
frames prior to the first frame with video.

7 years agovoc/avs: Do not change the sample rate mid-stream.
Justin Ruggles [Thu, 12 Jan 2012 02:10:35 +0000 (21:10 -0500)]
voc/avs: Do not change the sample rate mid-stream.

Also, set the time base based on the sample rate.
lavf-voc seek test updated to reflect slightly different seek points.

7 years agosegafilm: use the sample rate as the time base for audio streams
Justin Ruggles [Wed, 11 Jan 2012 16:07:40 +0000 (11:07 -0500)]
segafilm: use the sample rate as the time base for audio streams

7 years agoea: fix audio pts
Justin Ruggles [Wed, 11 Jan 2012 15:22:47 +0000 (10:22 -0500)]
ea: fix audio pts

The time base is 1 / sample_rate, not 90000.
Several more codecs encode the sample count in the first 4 bytes of the
chunk, so we set the durations accordingly. Also, we can set start_time and
packet duration instead of keeping track of the sample count in the demuxer.

7 years agopsx-str: fix audio pts
Justin Ruggles [Wed, 11 Jan 2012 14:41:06 +0000 (09:41 -0500)]
psx-str: fix audio pts

Each packet has 18 sectors with 224/channels samples in each sector.

7 years agovqf: set packet duration
Justin Ruggles [Fri, 13 Jan 2012 19:04:11 +0000 (14:04 -0500)]
vqf: set packet duration

Fixes timestamp calculation.
The FATE reference is updated because timestamp calculations are now more
accurate. Previous timestamps were based on average bit rate.

7 years agotta demuxer: set packet duration
Justin Ruggles [Fri, 13 Jan 2012 18:35:06 +0000 (13:35 -0500)]
tta demuxer: set packet duration

7 years agompegaudio_parser: do not ignore information from the first parsed frame
Justin Ruggles [Mon, 16 Jan 2012 16:49:51 +0000 (11:49 -0500)]
mpegaudio_parser: do not ignore information from the first parsed frame

Update some demuxing and seeking fate tests.

7 years agompegaudio_parser: be less picky about the start position
Michael Niedermayer [Tue, 21 Jun 2011 00:49:20 +0000 (02:49 +0200)]
mpegaudio_parser: be less picky about the start position

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agothp: set audio packet durations
Justin Ruggles [Wed, 29 Feb 2012 23:08:46 +0000 (18:08 -0500)]
thp: set audio packet durations

7 years agoavcodec: add a Vorbis parser to get packet duration
Justin Ruggles [Sun, 15 Jan 2012 18:38:03 +0000 (13:38 -0500)]
avcodec: add a Vorbis parser to get packet duration

This also allows for removing some of the Vorbis-related hacks.

7 years agovorbisdec: read the previous window flag for long windows
Justin Ruggles [Fri, 24 Feb 2012 23:04:05 +0000 (18:04 -0500)]
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.

7 years agompegts: fix stack array overread in read_sl_header()
Michael Niedermayer [Sat, 3 Mar 2012 20:03:11 +0000 (21:03 +0100)]
mpegts: fix stack array overread in read_sl_header()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegts: prevent get_bits64() from reading nonsense at the end.
Michael Niedermayer [Sat, 3 Mar 2012 20:02:17 +0000 (21:02 +0100)]
mpegts: prevent get_bits64() from reading nonsense at the end.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agocook: check that category is smaller than 8
Michael Niedermayer [Thu, 1 Mar 2012 18:03:41 +0000 (19:03 +0100)]
cook: check that category is smaller than 8

This fixes some out of global array accesses of dither_tab.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompeg-ts: fix handling of size=0 SL headers.
Michael Niedermayer [Sat, 3 Mar 2012 06:43:32 +0000 (07:43 +0100)]
mpeg-ts: fix handling of size=0 SL headers.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMAINTAINERS: add 0.10 to the releases, seems ive forgotten it.
Michael Niedermayer [Sat, 3 Mar 2012 04:26:28 +0000 (05:26 +0100)]
MAINTAINERS: add 0.10 to the releases, seems ive forgotten it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavc: unify similar code merged from both branches.
Nicolas George [Sat, 3 Mar 2012 09:35:36 +0000 (10:35 +0100)]
lavc: unify similar code merged from both branches.

7 years agovsrc_testsrc: free option values.
Nicolas George [Sat, 3 Mar 2012 11:16:55 +0000 (12:16 +0100)]
vsrc_testsrc: free option values.

7 years agovsrc_life: free option values.
Nicolas George [Sat, 3 Mar 2012 11:33:42 +0000 (12:33 +0100)]
vsrc_life: free option values.

7 years agovf_fade: free type when overwriting it.
Nicolas George [Sat, 3 Mar 2012 11:20:30 +0000 (12:20 +0100)]
vf_fade: free type when overwriting it.

7 years agolavc: free the output packet when encoding failed or produced no output.
Anton Khirnov [Fri, 24 Feb 2012 12:14:02 +0000 (13:14 +0100)]
lavc: free the output packet when encoding failed or produced no output.

7 years agolavc: preserve avpkt->destruct in ff_alloc_packet().
Anton Khirnov [Fri, 24 Feb 2012 21:39:19 +0000 (22:39 +0100)]
lavc: preserve avpkt->destruct in ff_alloc_packet().

Also, don't bother with saving/restoring data, av_init_packet doesn't
touch it.

7 years agolavc: clarify the meaning of AVCodecContext.frame_number.
Anton Khirnov [Thu, 1 Mar 2012 11:25:50 +0000 (12:25 +0100)]
lavc: clarify the meaning of AVCodecContext.frame_number.

7 years agoarm: Fix 10l typo
Michael Niedermayer [Sat, 3 Mar 2012 03:35:15 +0000 (04:35 +0100)]
arm: Fix 10l typo

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agobluray protocol
Petri Hintukainen [Sat, 3 Mar 2012 03:25:48 +0000 (04:25 +0100)]
bluray protocol

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agokvmc: Fix out of reference frame reads.
Michael Niedermayer [Sat, 3 Mar 2012 03:14:37 +0000 (04:14 +0100)]
kvmc: Fix out of reference frame reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoqpeg: fix overreads.
Michael Niedermayer [Sat, 3 Mar 2012 02:50:05 +0000 (03:50 +0100)]
qpeg: fix overreads.

qpeg should probably be changed to use the checked bytestream reader.
But for now this fixes it and is significantly less work.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoqpeg: Fix out of array writes.
Michael Niedermayer [Sat, 3 Mar 2012 02:37:52 +0000 (03:37 +0100)]
qpeg: Fix out of array writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosrtdec: fix a format string vulnerability.
Fabian Greffrath [Sat, 3 Mar 2012 01:35:27 +0000 (02:35 +0100)]
srtdec: fix a format string vulnerability.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRemove duplicate initializers for VDA_VLD and GBR24P.
Dale Curtis [Fri, 2 Mar 2012 22:56:33 +0000 (14:56 -0800)]
Remove duplicate initializers for VDA_VLD and GBR24P.

Noticed by the Chromium Mac clang build, http://crbug.com/116599

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegts: Pad the packet buffer in handle_packet().
Alex Converse [Fri, 2 Mar 2012 18:13:07 +0000 (10:13 -0800)]
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
7 years agompegts: Do not call read_sl_header() when no bytes remain in the buffer.
Alex Converse [Fri, 2 Mar 2012 18:12:11 +0000 (10:12 -0800)]
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
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Fri, 2 Mar 2012 23:09:47 +0000 (00:09 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master: (29 commits)
  amrwb: remove duplicate arguments from extrapolate_isf().
  amrwb: error out early if mode is invalid.
  h264: change underread for 10bit QPEL to overread.
  matroska: check buffer size for RM-style byte reordering.
  vp8: disable mmx functions with sse/sse2 counterparts on x86-64.
  vp8: change int stride to ptrdiff_t stride.
  wma: fix invalid buffer size assumptions causing random overreads.
  Windows Media Audio Lossless decoder
  rv10/20: Fix slice overflow with checked bitstream reader.
  h263dec: Disallow width/height changing with frame threads.
  rv10/20: Fix a buffer overread caused by losing track of the remaining buffer size.
  rmdec: Honor .RMF tag size rather than assuming 18.
  g722: Fix the QMF scaling
  r3d: don't set codec timebase.
  electronicarts: set timebase for tgv video.
  electronicarts: parse the framerate for cmv video.
  ogg: don't set codec timebase
  electronicarts: don't set codec timebase
  avs: don't set codec timebase
  wavpack: Fix an integer overflow
  ...

Conflicts:
libavcodec/arm/vp8dsp_init_arm.c
libavcodec/fraps.c
libavcodec/h264.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo.c
libavcodec/msmpeg4.c
libavcodec/pnmdec.c
libavcodec/qpeg.c
libavcodec/rawenc.c
libavcodec/ulti.c
libavcodec/vcr1.c
libavcodec/version.h
libavcodec/wmalosslessdec.c
libavformat/electronicarts.c
libswscale/ppc/yuv2rgb_altivec.c
tests/ref/acodec/g722
tests/ref/fate/ea-cmv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosimple_idct: idct_4col_put: Fix out of array reads.
Michael Niedermayer [Fri, 2 Mar 2012 21:09:44 +0000 (22:09 +0100)]
simple_idct: idct_4col_put: Fix out of array reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agorawdec: fix input overread.
Michael Niedermayer [Fri, 2 Mar 2012 21:04:00 +0000 (22:04 +0100)]
rawdec: fix input overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoamrwb: remove duplicate arguments from extrapolate_isf().
Ronald S. Bultje [Thu, 1 Mar 2012 23:44:25 +0000 (15:44 -0800)]
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
7 years agotruemotion1: Check input buffer size against header size.
Michael Niedermayer [Fri, 2 Mar 2012 20:36:42 +0000 (21:36 +0100)]
truemotion1: Check input buffer size against header size.

Fixes overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomjpeg: Check for interlaced progressive frames
Michael Niedermayer [Fri, 2 Mar 2012 20:35:58 +0000 (21:35 +0100)]
mjpeg: Check for interlaced progressive frames

Fixes null pointer dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosnow: check reference frame indices.
Michael Niedermayer [Fri, 2 Mar 2012 19:53:00 +0000 (20:53 +0100)]
snow: check reference frame indices.

Fixes NULL ptr dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoamrwb: error out early if mode is invalid.
Ronald S. Bultje [Thu, 1 Mar 2012 21:51:21 +0000 (13:51 -0800)]
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
7 years agoh264: change underread for 10bit QPEL to overread.
Ronald S. Bultje [Sun, 26 Feb 2012 01:24:56 +0000 (17:24 -0800)]
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.

7 years agomatroska: check buffer size for RM-style byte reordering.
Ronald S. Bultje [Fri, 2 Mar 2012 01:01:22 +0000 (17:01 -0800)]
matroska: check buffer size for RM-style byte reordering.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agovp8: disable mmx functions with sse/sse2 counterparts on x86-64.
Ronald S. Bultje [Fri, 2 Mar 2012 04:39:49 +0000 (20:39 -0800)]
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.

7 years agovp8: change int stride to ptrdiff_t stride.
Ronald S. Bultje [Fri, 2 Mar 2012 05:17:03 +0000 (21:17 -0800)]
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.

7 years agowma: fix invalid buffer size assumptions causing random overreads.
Ronald S. Bultje [Fri, 2 Mar 2012 00:19:51 +0000 (16:19 -0800)]
wma: fix invalid buffer size assumptions causing random overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoWindows Media Audio Lossless decoder
Mashiat Sarker Shakkhar [Thu, 1 Mar 2012 12:43:00 +0000 (12:43 +0000)]
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>
7 years agohuffyuv: pad classic huffman tables so as to avoid bitreader overread.
Michael Niedermayer [Fri, 2 Mar 2012 17:49:39 +0000 (18:49 +0100)]
huffyuv: pad classic huffman tables so as to avoid bitreader overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovc1: mquant is not allowed to be 0
Michael Niedermayer [Fri, 2 Mar 2012 17:24:21 +0000 (18:24 +0100)]
vc1: mquant is not allowed to be 0

Fixes out of bounds read.
Checked against SMPTE 421M-2006

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agorv10/20: Fix slice overflow with checked bitstream reader.
Alex Converse [Thu, 1 Mar 2012 21:24:55 +0000 (13:24 -0800)]
rv10/20: Fix slice overflow with checked bitstream reader.

7 years agoh263dec: Disallow width/height changing with frame threads.
Michael Niedermayer [Fri, 17 Feb 2012 21:35:10 +0000 (13:35 -0800)]
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>
7 years agorv10/20: Fix a buffer overread caused by losing track of the remaining buffer size.
Alex Converse [Thu, 1 Mar 2012 22:07:22 +0000 (14:07 -0800)]
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
7 years agormdec: Honor .RMF tag size rather than assuming 18.
Alex Converse [Fri, 2 Mar 2012 00:47:54 +0000 (16:47 -0800)]
rmdec: Honor .RMF tag size rather than assuming 18.

7 years agog722: Fix the QMF scaling
Martin Storsjö [Fri, 2 Mar 2012 15:03:06 +0000 (17:03 +0200)]
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>
7 years agor3d: don't set codec timebase.
Anton Khirnov [Fri, 2 Mar 2012 13:08:11 +0000 (14:08 +0100)]
r3d: don't set codec timebase.

It's not supposed to be set by demuxers.

Set avg_frame_rate and r_frame_rate instead.

7 years agoh263: fix zygo debug printing overreading.
Michael Niedermayer [Fri, 2 Mar 2012 15:52:32 +0000 (16:52 +0100)]
h263: fix zygo debug printing overreading.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agowmadec: fix off by 1 error on the pow_tab index check.
Michael Niedermayer [Fri, 2 Mar 2012 15:44:49 +0000 (16:44 +0100)]
wmadec: fix off by 1 error on the pow_tab index check.

Fixes global out of array read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agotimefilter: better selftest code.
Michael Niedermayer [Fri, 2 Mar 2012 05:21:48 +0000 (06:21 +0100)]
timefilter: better selftest code.

Add support for divergence detection and variable period.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh261: check mtype.
Michael Niedermayer [Fri, 2 Mar 2012 14:58:14 +0000 (15:58 +0100)]
h261: check mtype.

Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoelectronicarts: set timebase for tgv video.
Anton Khirnov [Thu, 1 Mar 2012 20:24:16 +0000 (21:24 +0100)]
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.

7 years agoelectronicarts: parse the framerate for cmv video.
Anton Khirnov [Thu, 1 Mar 2012 12:16:49 +0000 (13:16 +0100)]
electronicarts: parse the framerate for cmv video.

7 years agoogg: don't set codec timebase
Anton Khirnov [Thu, 24 Nov 2011 19:58:22 +0000 (20:58 +0100)]
ogg: don't set codec timebase

Demuxers are not supposed to set it.

7 years agoelectronicarts: don't set codec timebase
Anton Khirnov [Thu, 24 Nov 2011 19:58:22 +0000 (20:58 +0100)]
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).

7 years agoavs: don't set codec timebase
Anton Khirnov [Thu, 24 Nov 2011 19:58:22 +0000 (20:58 +0100)]
avs: don't set codec timebase

Demuxers are not supposed to set it.
Set r_frame_rate and avg_frame_rate instead.

7 years agowavpack: Fix an integer overflow
Derek Buitenhuis [Thu, 1 Mar 2012 21:34:57 +0000 (16:34 -0500)]
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>
7 years agolavf: fix update_initial_durations() so it handles missing durations with the initial...
Michael Niedermayer [Fri, 2 Mar 2012 05:22:20 +0000 (06:22 +0100)]
lavf: fix update_initial_durations() so it handles missing durations with the initial timestamp being known.

This fixes duplicate timestamps on mp2 in ts with non seekable input.
It also fixed the fate pva demux timestamps.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agowavpack: Fix an integer overflow
Derek Buitenhuis [Thu, 1 Mar 2012 21:36:08 +0000 (16:36 -0500)]
wavpack: Fix an integer overflow

Integer Overflow Checker detected an integer
overflow while FATE was running.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agofate: Add sunrast regression test
Derek Buitenhuis [Thu, 1 Mar 2012 23:24:44 +0000 (18:24 -0500)]
fate: Add sunrast regression test

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoroqvideodec: improve end of input buffer check
Michael Niedermayer [Fri, 2 Mar 2012 01:32:14 +0000 (02:32 +0100)]
roqvideodec: improve end of input buffer check

This fixes a out of array read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoswscale: K&R formatting cosmetics for PowerPC code (part II/II)
Diego Biurrun [Tue, 21 Feb 2012 18:59:38 +0000 (19:59 +0100)]
swscale: K&R formatting cosmetics for PowerPC code (part II/II)

7 years agomp3dec: Fix reading file size and frames in VBRI headers
Ingo Brückl [Fri, 16 Sep 2011 22:00:19 +0000 (15:00 -0700)]
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>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Thu, 1 Mar 2012 22:11:31 +0000 (23:11 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  h264: error out on invalid bitdepth.
  aacsbr: use a swap index for the Y matrix rather than copy buffers.
  huffyuv: do not abort on unknown pix_fmt; instead, return an error.
  lcl: return negative error codes on decode_init() errors.
  rtpenc: Use MB info side data for splitting H263 packets for RFC 2190
  h263enc: Add an option for outputting info about MBs as side data
  avpacket: Add a function for shrinking already allocated side data
  nellymoserdec: Saner and faster IMDCT windowing

Conflicts:
doc/APIchanges
libavcodec/avpacket.c
libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomjpegdec: use correct variable in av_log invocation
Diego Biurrun [Wed, 29 Feb 2012 18:47:49 +0000 (19:47 +0100)]
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 *’

7 years agormdec: adjust printf format string specifier to fix warning
Diego Biurrun [Sun, 26 Feb 2012 22:42:37 +0000 (23:42 +0100)]
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’

7 years agoReplace AVFrame pointer type punning by proper struct member assignments.
Diego Biurrun [Mon, 27 Feb 2012 21:08:41 +0000 (22:08 +0100)]
Replace AVFrame pointer type punning by proper struct member assignments.

7 years agoReplace AVFrame pointer casts by proper struct member accesses.
Diego Biurrun [Mon, 27 Feb 2012 21:02:45 +0000 (22:02 +0100)]
Replace AVFrame pointer casts by proper struct member accesses.

7 years agoRemove unnecessary AVFrame pointer casts.
Diego Biurrun [Mon, 27 Feb 2012 07:51:20 +0000 (08:51 +0100)]
Remove unnecessary AVFrame pointer casts.

7 years agomsmpeg4: Split encoding backend code off from general backend code.
Diego Biurrun [Sat, 18 Feb 2012 13:28:43 +0000 (14:28 +0100)]
msmpeg4: Split encoding backend code off from general backend code.

7 years agolavc: shrink encoded video packet size after encoding.
Anton Khirnov [Thu, 1 Mar 2012 11:15:45 +0000 (12:15 +0100)]
lavc: shrink encoded video packet size after encoding.

Based on a patch by Nicolas George <nicolas.george <at> normalesup.org>

7 years agovc1: avoid reading beyond the last line in vc1_draw_sprites()
Michael Niedermayer [Thu, 1 Mar 2012 21:19:36 +0000 (22:19 +0100)]
vc1: avoid reading beyond the last line in vc1_draw_sprites()

Fixes overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: error out on invalid bitdepth.
Ronald S. Bultje [Thu, 1 Mar 2012 19:56:05 +0000 (11:56 -0800)]
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
7 years agoaacsbr: use a swap index for the Y matrix rather than copy buffers.
Christophe Gisquet [Thu, 23 Feb 2012 22:25:44 +0000 (22:25 +0000)]
aacsbr: use a swap index for the Y matrix rather than copy buffers.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
7 years agoeatgq: Pass error code from tgq_decode_mb() and let the caller fail.
Michael Niedermayer [Thu, 1 Mar 2012 18:56:57 +0000 (19:56 +0100)]
eatgq: Pass error code from tgq_decode_mb() and let the caller fail.

This fixes a over read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovc1: fix out of array reads in vc1_inv_trans_4x4_c()
Michael Niedermayer [Thu, 1 Mar 2012 18:24:24 +0000 (19:24 +0100)]
vc1: fix out of array reads in vc1_inv_trans_4x4_c()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovc1: fix out of array reads in vc1_inv_trans_4x8_c()
Michael Niedermayer [Thu, 1 Mar 2012 18:18:34 +0000 (19:18 +0100)]
vc1: fix out of array reads in vc1_inv_trans_4x8_c()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovc1: fix out of array reads in vc1_inv_trans_8x4_c()
Michael Niedermayer [Thu, 1 Mar 2012 18:14:50 +0000 (19:14 +0100)]
vc1: fix out of array reads in vc1_inv_trans_8x4_c()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agohuffyuv: do not abort on unknown pix_fmt; instead, return an error.
Ronald S. Bultje [Thu, 1 Mar 2012 17:41:22 +0000 (09:41 -0800)]
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
7 years agompc: Fix mpc_CC table and use.
Michael Niedermayer [Thu, 1 Mar 2012 15:16:13 +0000 (16:16 +0100)]
mpc: Fix mpc_CC table and use.

This is based on the reference implementation and fixes
a global out of array read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompc: Fix mpc_SCF use and content.
Michael Niedermayer [Thu, 1 Mar 2012 14:55:31 +0000 (15:55 +0100)]
mpc: Fix mpc_SCF use and content.

This fixes a out of global array read.
This change is based on the reference mpc imlementation.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolcl: return negative error codes on decode_init() errors.
Ronald S. Bultje [Thu, 1 Mar 2012 01:50:28 +0000 (17:50 -0800)]
lcl: return negative error codes on decode_init() errors.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agortpenc: Use MB info side data for splitting H263 packets for RFC 2190
Martin Storsjö [Fri, 10 Feb 2012 08:31:19 +0000 (10:31 +0200)]
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>
7 years agoh263enc: Add an option for outputting info about MBs as side data
Martin Storsjö [Mon, 27 Feb 2012 21:23:45 +0000 (23:23 +0200)]
h263enc: Add an option for outputting info about MBs as side data

Signed-off-by: Martin Storsjö <martin@martin.st>