ffmpeg.git
7 years agofate: Add tests for more AAC features.
Gaurav Narula [Thu, 29 Dec 2011 21:20:22 +0000 (02:50 +0530)]
fate: Add tests for more AAC features.

al15_44 uses independent coupling.
al18_44 uses PNS (perceptual noise substitution).
am05_44 uses main prediction and independent coupling.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
7 years agoaacps: Add missing newline in error message.
Alex Converse [Fri, 6 Jan 2012 22:49:11 +0000 (14:49 -0800)]
aacps: Add missing newline in error message.

7 years agofate: Add tests for vc1/wmapro in ism.
Alex Converse [Fri, 6 Jan 2012 02:39:20 +0000 (18:39 -0800)]
fate: Add tests for vc1/wmapro in ism.

7 years agoaacdec: Add a fate test for 5.1 channel SBR.
Alex Converse [Sat, 7 Jan 2012 01:23:49 +0000 (17:23 -0800)]
aacdec: Add a fate test for 5.1 channel SBR.

7 years agoaacdec: Turn off PS for multichannel files that use PCE based configs.
Alex Converse [Sat, 7 Jan 2012 01:22:45 +0000 (17:22 -0800)]
aacdec: Turn off PS for multichannel files that use PCE based configs.

Fixes al_sbr_cm_48_5.1.mp4.

7 years agocabac: remove put_cabac_u/ueg from cabac-test.
Diego Biurrun [Sat, 7 Jan 2012 19:27:31 +0000 (20:27 +0100)]
cabac: remove put_cabac_u/ueg from cabac-test.

The functions are not used in any part of Libav, therefore testing them in the
cabac-test is unnecessary. Since this makes them unused, remove the functions.

7 years agoswscale: RGB4444 and BGR444 input
Paul B Mahol [Mon, 9 Jan 2012 01:24:33 +0000 (01:24 +0000)]
swscale: RGB4444 and BGR444 input

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoFATE: add test for xWMA demuxer.
Mike Melanson [Sun, 8 Jan 2012 03:59:07 +0000 (19:59 -0800)]
FATE: add test for xWMA demuxer.

(Does not attempt to decode percetual audio data inside.)
Code coverage: libavformat/xwma.c: 3% -> 75%

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoFATE: add test for SMJPEG demuxer and associated IMA ADPCM audio decoder.
Mike Melanson [Sun, 8 Jan 2012 03:59:08 +0000 (19:59 -0800)]
FATE: add test for SMJPEG demuxer and associated IMA ADPCM audio decoder.

(Don't attempt to decode JPEG data.)
Code coverage: libavformat/smjpeg.c: 0% -> 69%
libavcodec/adpcm.c: 0% -> 10% (fresh run); 92.4% -> 93% following a FATE run

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agompegaudiodec: optimized iMDCT transform
Vitor Sessak [Thu, 5 Jan 2012 19:26:33 +0000 (20:26 +0100)]
mpegaudiodec: optimized iMDCT transform

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agompegaudiodec: change imdct window arrangment for better pointer alignment
Vitor Sessak [Wed, 4 Jan 2012 20:43:47 +0000 (21:43 +0100)]
mpegaudiodec: change imdct window arrangment for better pointer alignment

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agompegaudiodec: move imdct and windowing function to mpegaudiodsp
Vitor Sessak [Wed, 4 Jan 2012 20:32:47 +0000 (21:32 +0100)]
mpegaudiodec: move imdct and windowing function to mpegaudiodsp

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agompegaudiodec: interleave iMDCT buffer to simplify future SIMD implementations
Vitor Sessak [Tue, 3 Jan 2012 20:40:57 +0000 (21:40 +0100)]
mpegaudiodec: interleave iMDCT buffer to simplify future SIMD implementations

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoswscale: convert yuy2/uyvy/nv12/nv21ToY/UV from inline asm to yasm.
Ronald S. Bultje [Mon, 9 Jan 2012 00:37:43 +0000 (16:37 -0800)]
swscale: convert yuy2/uyvy/nv12/nv21ToY/UV from inline asm to yasm.

Also implement SSE2/AVX variants.

7 years agoFATE: test to exercise WTV demuxer.
Mike Melanson [Sun, 8 Jan 2012 03:59:09 +0000 (19:59 -0800)]
FATE: test to exercise WTV demuxer.

Does not attempt to decode perceptual codecs inside.
Code coverage: libavformat/wtv.c: 0% -> 71%

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agomjpegdec: K&R formatting cosmetics
Daniel Huang [Sun, 8 Jan 2012 19:14:37 +0000 (13:14 -0600)]
mjpegdec: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agoswscale: K&R formatting cosmetics for code examples
Diego Biurrun [Tue, 3 Jan 2012 11:20:59 +0000 (12:20 +0100)]
swscale: K&R formatting cosmetics for code examples

7 years agoswscale: K&R reformatting cosmetics for header files
Diego Biurrun [Fri, 30 Dec 2011 17:37:16 +0000 (18:37 +0100)]
swscale: K&R reformatting cosmetics for header files

7 years agoFATE test: cvid-grayscale; ensures that the grayscale Cinepak variant is exercised.
Mike Melanson [Sun, 8 Jan 2012 03:59:06 +0000 (19:59 -0800)]
FATE test: cvid-grayscale; ensures that the grayscale Cinepak variant is exercised.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agobfi: Use bytestream2 functions to prevent buffer overreads.
Aneesh Dogra [Sun, 8 Jan 2012 19:57:58 +0000 (01:27 +0530)]
bfi: Use bytestream2 functions to prevent buffer overreads.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agodpcm: Fix invalid writes
Laurentiu Ion [Sun, 8 Jan 2012 21:05:37 +0000 (23:05 +0200)]
dpcm: Fix invalid writes

Fixes bug: #152

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoutvideo: frame multithreading.
Aneesh Dogra [Sun, 8 Jan 2012 19:19:46 +0000 (00:49 +0530)]
utvideo: frame multithreading.

>> time ./avconv -i file.avi -f null -
Before : real 0m7.784s
After  : real   0m3.662s

Tested on a Intel Core i3 Processor (2 cores, 4 threads).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agovorbis: An additional defense in the Vorbis codec.
Chris Evans [Thu, 5 Jan 2012 20:25:41 +0000 (21:25 +0100)]
vorbis: An additional defense in the Vorbis codec.

Fixes Bug: #190
Chromium Bug: #100543
Related to CVE-2011-3893

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agovorbisdec: Fix decoding bug with channel handling
Reinhard Tartler [Thu, 5 Jan 2012 20:40:18 +0000 (21:40 +0100)]
vorbisdec: Fix decoding bug with channel handling

Fixes Bug: #191
Chromium Bug: #101458
CVE-2011-3895

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agocabac: Move code only used within the CABAC test program into the test program.
Diego Biurrun [Sat, 7 Jan 2012 19:46:09 +0000 (20:46 +0100)]
cabac: Move code only used within the CABAC test program into the test program.

7 years agovp56: Drop unnecessary cabac.h #include.
Diego Biurrun [Sat, 7 Jan 2012 17:37:28 +0000 (18:37 +0100)]
vp56: Drop unnecessary cabac.h #include.

7 years agoh264-test: Initialize AVCodecContext.av_class.
Diego Biurrun [Sat, 7 Jan 2012 20:36:31 +0000 (21:36 +0100)]
h264-test: Initialize AVCodecContext.av_class.

This fixes a segfault on startup.

Also remove a commented-out and completely unused variable.

7 years agobuild: Skip compiling network.h and rtsp.h if networking is not enabled.
Diego Biurrun [Sat, 7 Jan 2012 18:17:15 +0000 (19:17 +0100)]
build: Skip compiling network.h and rtsp.h if networking is not enabled.

rtsp.h relies on network.h and the latter conditionally defines fallback OS
structures that rely on configure tests, which are only run if networking
is enabled.

7 years agocosmetics: drop some pointless parentheses
Diego Biurrun [Sat, 7 Jan 2012 18:07:42 +0000 (19:07 +0100)]
cosmetics: drop some pointless parentheses

7 years agoDisable annoying warning without changing behavior
Andrey Utkin [Sat, 7 Jan 2012 20:38:00 +0000 (22:38 +0200)]
Disable annoying warning without changing behavior

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agofaq: Solutions for common problems with sample paths when running FATE.
Diego Biurrun [Fri, 30 Dec 2011 22:14:14 +0000 (23:14 +0100)]
faq: Solutions for common problems with sample paths when running FATE.

7 years agoavcodec: attempt to clarify the CODEC_CAP_DELAY documentation
Justin Ruggles [Sat, 7 Jan 2012 16:25:04 +0000 (11:25 -0500)]
avcodec: attempt to clarify the CODEC_CAP_DELAY documentation

7 years agoavcodec: fix avcodec_encode_audio() documentation.
Justin Ruggles [Sat, 31 Dec 2011 00:35:45 +0000 (19:35 -0500)]
avcodec: fix avcodec_encode_audio() documentation.

the previous documentation indicated how many bytes are read from the input,
not how many samples are read.

7 years agoFATE: xmv-demux test; exercise the XMV demuxer without decoding the perceptual codecs...
Mike Melanson [Sat, 7 Jan 2012 17:29:35 +0000 (09:29 -0800)]
FATE: xmv-demux test; exercise the XMV demuxer without decoding the perceptual codecs inside.

Code coverage:
libavformat/xmv.c: 3% -> 91%

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agovqf: recognize more metadata chunks
Paul B Mahol [Sat, 7 Jan 2012 17:31:31 +0000 (17:31 +0000)]
vqf: recognize more metadata chunks

Do not create tags for non-char chunks.
Create readable tag for DSIZ chunk.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoFATE test: BMV demuxer and associated video and audio decoders.
Mike Melanson [Sat, 7 Jan 2012 17:29:32 +0000 (09:29 -0800)]
FATE test: BMV demuxer and associated video and audio decoders.

Code coverage:
libavcodec/bmv.c: 0% -> 75%
libavformat/bmv.c: 0% -> 85%

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoFATE: indeo4 video decoder test.
Mike Melanson [Sat, 7 Jan 2012 17:29:34 +0000 (09:29 -0800)]
FATE: indeo4 video decoder test.

Code coverage:
libavcodec/indeo4.c: 0% -> 78%

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoFATE: update xxan-wc4 test to a sample with more code coverage.
Mike Melanson [Sat, 7 Jan 2012 17:29:33 +0000 (09:29 -0800)]
FATE: update xxan-wc4 test to a sample with more code coverage.

The previous sample used for this test only contained type 0 frames.
Replace it with a sample that also features type 1 frames.
Code coverage:
libavcodec/xxan.c: 72% -> 89%

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoChange the recent h264_mp4toannexb bitstream filter test to output to an elementary...
Mike Melanson [Sat, 7 Jan 2012 17:29:30 +0000 (09:29 -0800)]
Change the recent h264_mp4toannexb bitstream filter test to output to an elementary stream rather than a program stream.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agog722enc: validate AVCodecContext.trellis
Justin Ruggles [Fri, 6 Jan 2012 21:01:07 +0000 (16:01 -0500)]
g722enc: validate AVCodecContext.trellis

7 years agog722enc: set frame_size, and also handle an odd number of input samples
Justin Ruggles [Fri, 6 Jan 2012 20:32:44 +0000 (15:32 -0500)]
g722enc: set frame_size, and also handle an odd number of input samples

The fate reference is updated because the previous test skipped a sample in
each encode() call due each input frame having an odd number of samples.

7 years agog722enc: split encoding into separate functions for trellis vs. no trellis
Justin Ruggles [Fri, 6 Jan 2012 04:34:09 +0000 (23:34 -0500)]
g722enc: split encoding into separate functions for trellis vs. no trellis

7 years agompegaudiodec: Use clearer pointer math
Vitor Sessak [Tue, 3 Jan 2012 20:25:59 +0000 (21:25 +0100)]
mpegaudiodec: Use clearer pointer math

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agotta: Fix returned error code at EOF
Michael Niedermayer [Fri, 6 Jan 2012 16:34:22 +0000 (17:34 +0100)]
tta: Fix returned error code at EOF

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agotta: fix off be 1 error in the end detection.
Michael Niedermayer [Fri, 6 Jan 2012 16:30:05 +0000 (17:30 +0100)]
tta: fix off be 1 error in the end detection.
Fixes use of uninitialized values.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agotta: fix 24-bit decoding.
Justin Ruggles [Fri, 6 Jan 2012 23:14:24 +0000 (18:14 -0500)]
tta: fix 24-bit decoding.

Decode to the correct output buffer.

7 years agoipmovie: Add param change side data if the video dimensions have changed
Paul B Mahol [Fri, 6 Jan 2012 01:09:06 +0000 (03:09 +0200)]
ipmovie: Add param change side data if the video dimensions have changed

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agointerplayvideo: Handle changed video dimensions on the fly
Paul B Mahol [Fri, 6 Jan 2012 01:07:31 +0000 (03:07 +0200)]
interplayvideo: Handle changed video dimensions on the fly

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agolibavcodec: Handle param change side data in avcodec_decode_video2, too
Martin Storsjö [Fri, 6 Jan 2012 01:06:25 +0000 (03:06 +0200)]
libavcodec: Handle param change side data in avcodec_decode_video2, too

Also call avcodec_set_dimensions on dimension param change packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agolibavcodec: Move apply_param_change up above avcodec_decode_video2
Martin Storsjö [Fri, 6 Jan 2012 01:05:27 +0000 (03:05 +0200)]
libavcodec: Move apply_param_change up above avcodec_decode_video2

This is in preparation to calling it from avcodec_decode_video2.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoindeo3: check motion vectors for validity
Janne Grunau [Fri, 6 Jan 2012 00:21:36 +0000 (01:21 +0100)]
indeo3: check motion vectors for validity

Fixes null pointer dereferences in fuzzed files found by Oana Stratulat.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agoindeo5: Fix null pointer dereference.
Michael Niedermayer [Tue, 20 Dec 2011 21:06:35 +0000 (22:06 +0100)]
indeo5: Fix null pointer dereference.

Bug found by: Oana Stratulat

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agoelectronicarts: check bytes per sample for validity
Janne Grunau [Thu, 5 Jan 2012 21:12:35 +0000 (22:12 +0100)]
electronicarts: check bytes per sample for validity

Prevents division by zero.

7 years agoflicvideo: fix invalid reads
Laurentiu Ion [Fri, 6 Jan 2012 18:42:00 +0000 (20:42 +0200)]
flicvideo: fix invalid reads

Prevent invalid reads using bytestream2 functions.
Fixes bug #126.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agovorbis: Avoid some out-of-bounds reads
Chris Evans [Thu, 5 Jan 2012 20:25:41 +0000 (21:25 +0100)]
vorbis: Avoid some out-of-bounds reads

Fixes Bug: #190
Chromium Bug: #100543
Related to CVE-2011-3893

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agovqf: add more known extensions
Paul B Mahol [Fri, 6 Jan 2012 17:18:07 +0000 (17:18 +0000)]
vqf: add more known extensions

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agocabac: remove unused function renorm_cabac_decoder
Diego Biurrun [Tue, 27 Dec 2011 10:37:31 +0000 (11:37 +0100)]
cabac: remove unused function renorm_cabac_decoder

7 years agoh264: Only use symbols from the SVQ3 decoder under proper conditionals.
Diego Biurrun [Fri, 6 Jan 2012 00:34:16 +0000 (01:34 +0100)]
h264: Only use symbols from the SVQ3 decoder under proper conditionals.

Fixes --disable-everything --enable-decoder=h264 --disable-optimizations.

7 years agoadd bytestream2_tell() and bytestream2_seek() functions
Justin Ruggles [Thu, 22 Dec 2011 03:32:04 +0000 (22:32 -0500)]
add bytestream2_tell() and bytestream2_seek() functions

7 years agoparsers: initialize MpegEncContext.slice_context_count to 1
Janne Grunau [Thu, 5 Jan 2012 23:17:37 +0000 (00:17 +0100)]
parsers: initialize MpegEncContext.slice_context_count to 1

The mpeg4 video, H264 and VC-1 parser hold (directly or indirectly)
a MpegEncContext in their private context. Since they do not call the
common mpegvideo init function slice_context_count has explicitly set
to 1.
Prevents a null pointer dereference in the h264 parser and fixes
bug 193.

7 years agospdifenc: use special alignment for DTS-HD length_code
Anssi Hannula [Fri, 30 Dec 2011 20:48:18 +0000 (22:48 +0200)]
spdifenc: use special alignment for DTS-HD length_code

Align IEC 61937 length_code for DTS-HD so that
(length_code & 0xf) == 0x8. This is reportedly needed with some
receivers.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoipmovie: do not read audio packets before the codec is known
Janne Grunau [Thu, 5 Jan 2012 20:57:22 +0000 (21:57 +0100)]
ipmovie: do not read audio packets before the codec is known

Prevents a division by zero.

7 years agotruemotion2: check size before GetBitContext initialisation
Janne Grunau [Thu, 5 Jan 2012 20:28:03 +0000 (21:28 +0100)]
truemotion2: check size before GetBitContext initialisation

Prevents null ptr derefence for negative sizes.

7 years agoavio: Only do implicit network initialization for network protocols
Martin Storsjö [Fri, 30 Dec 2011 09:43:10 +0000 (11:43 +0200)]
avio: Only do implicit network initialization for network protocols

The implicit network initialization is set to be removed in the
future, but is kept for compatibility. By not doing the implicit
initialization for non-network protocols, we avoid the warning
about avformat_network_init() not being called for these, where
it really doesn't make much sense.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoavio: Add an URLProtocol flag for indicating that a protocol uses network
Martin Storsjö [Fri, 30 Dec 2011 09:38:05 +0000 (11:38 +0200)]
avio: Add an URLProtocol flag for indicating that a protocol uses network

This definition is in two files, since the definitions will move
to the private header at the next bump.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoadpcm: ADPCM Electronic Arts has always two channels
Janne Grunau [Thu, 5 Jan 2012 19:50:55 +0000 (20:50 +0100)]
adpcm: ADPCM Electronic Arts has always two channels

7 years agomatroskadec: Fix a bug where a pointer was cached to an array that might later move...
Chris Evans [Thu, 5 Jan 2012 20:19:30 +0000 (21:19 +0100)]
matroskadec: Fix a bug where a pointer was cached to an array that might later move due to a realloc()

Fixes bug #190
Chromium bug #100492
related to CVE-2011-3893

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7 years agofate: Add missing reference file from 9b4767e4.
Alex Converse [Thu, 5 Jan 2012 19:14:23 +0000 (11:14 -0800)]
fate: Add missing reference file from 9b4767e4.

7 years agomov: Support MOV_CH_LAYOUT_USE_DESCRIPTIONS for labeled descriptions.
Alex Converse [Thu, 5 Jan 2012 01:42:15 +0000 (17:42 -0800)]
mov: Support MOV_CH_LAYOUT_USE_DESCRIPTIONS for labeled descriptions.

7 years ago4xm: Prevent buffer overreads.
Aneesh Dogra [Wed, 4 Jan 2012 19:58:21 +0000 (01:28 +0530)]
4xm: Prevent buffer overreads.

4xm decoder while decoding i2 frames can overread the buffer if proper checks
are not made.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agomjpegdec: parse RSTn to prevent skipping other data in mjpeg_decode_scan
Janne Grunau [Thu, 5 Jan 2012 02:47:21 +0000 (03:47 +0100)]
mjpegdec: parse RSTn to prevent skipping other data in mjpeg_decode_scan

Check explicitly if enough bits are left to prevent an infinite loop
when the bitstream buffer is not followed by zero-padding.

Based on patches by Michael Niedermayer <michaelni@gmx.at>.

7 years agovp3: add fate test for non-zero last coefficient
Janne Grunau [Tue, 3 Jan 2012 12:56:42 +0000 (13:56 +0100)]
vp3: add fate test for non-zero last coefficient

7 years agovp3: fix streams with non-zero last coefficient
Janne Grunau [Tue, 3 Jan 2012 12:38:01 +0000 (13:38 +0100)]
vp3: fix streams with non-zero last coefficient

Fixes a regression introduced in 8b94df0f2047e972.

7 years agoswscale: remove unused U/V arguments from yuv2rgb_write().
Ronald S. Bultje [Thu, 5 Jan 2012 03:48:02 +0000 (19:48 -0800)]
swscale: remove unused U/V arguments from yuv2rgb_write().

Also document the function somewhat.

7 years agotimer: K&R formatting cosmetics
Diego Biurrun [Tue, 3 Jan 2012 13:52:02 +0000 (14:52 +0100)]
timer: K&R formatting cosmetics

7 years agolavf: cosmetics, reformat av_read_frame().
Anton Khirnov [Thu, 5 Jan 2012 09:16:41 +0000 (10:16 +0100)]
lavf: cosmetics, reformat av_read_frame().

7 years agolavf: refactor av_read_frame() to make it easier to understand.
Anton Khirnov [Thu, 5 Jan 2012 09:14:07 +0000 (10:14 +0100)]
lavf: refactor av_read_frame() to make it easier to understand.

7 years agoReport an error if pitch_lag is zero in AMR-NB decoder.
Oana Stratulat [Wed, 4 Jan 2012 23:08:05 +0000 (01:08 +0200)]
Report an error if pitch_lag is zero in AMR-NB decoder.

This fixes an infinite loop in the decoder on specially
crafted files, and fixes bug 151.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoRevert "4xm: Prevent buffer overreads."
Ronald S. Bultje [Thu, 5 Jan 2012 05:27:31 +0000 (21:27 -0800)]
Revert "4xm: Prevent buffer overreads."

This reverts commit 295a7c0238e84b0ffa8f21ed938d45f51f54a4cd. The
patch breaks decoding of regular files (e.g. fate-4xm-2).

7 years ago4xm: Prevent buffer overreads.
Aneesh Dogra [Wed, 4 Jan 2012 19:58:21 +0000 (01:28 +0530)]
4xm: Prevent buffer overreads.

4xm decoder while decoding i2 frames can overread the buffer if proper checks
are not made.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years ago4xm: pass the correct remaining buffer size to decode_i2_frame().
Aneesh Dogra [Wed, 4 Jan 2012 18:40:01 +0000 (00:10 +0530)]
4xm: pass the correct remaining buffer size to decode_i2_frame().

frame_size is the number of bytes left in the packet, so if we are passing
buf-4 we can safely read frame_size+4 bytes.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years ago4xm: fix calculation of the next output line position in decode_i2_frame().
Aneesh Dogra [Wed, 4 Jan 2012 19:12:26 +0000 (00:42 +0530)]
4xm: fix calculation of the next output line position in decode_i2_frame().

The current code doesn't work unless width is an exact multiple of 16.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agomtv: Make sure audio_subsegments is not 0
Shitiz Garg [Thu, 15 Dec 2011 19:06:27 +0000 (00:36 +0530)]
mtv: Make sure audio_subsegments is not 0

audio_subsegments would be 0 and cause floating point exceptions
Fixes bugzilla #144

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agov4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined
Janne Grunau [Wed, 4 Jan 2012 19:29:57 +0000 (20:29 +0100)]
v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined

V4L2_FMT_FLAG_EMULATED was added in 2.6.32.

7 years agoavconv: add symbolic names for -vsync parameters
Anton Khirnov [Sat, 26 Nov 2011 10:01:33 +0000 (11:01 +0100)]
avconv: add symbolic names for -vsync parameters

7 years agoflvdec: Fix compiler warning for uninitialized variables
Jean First [Fri, 30 Dec 2011 20:08:02 +0000 (21:08 +0100)]
flvdec: Fix compiler warning for uninitialized variables

These can't be used uninitialized in practice, but the
compiler doesn't realize it.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortsp: Fix compiler warning for uninitialized variable
Jean First [Tue, 3 Jan 2012 22:01:28 +0000 (23:01 +0100)]
rtsp: Fix compiler warning for uninitialized variable

This one won't ever be used uninitialized in practice, but
the compiler doesn't realize it.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoulti: convert to new bytestream API.
Ronald S. Bultje [Wed, 4 Jan 2012 04:41:18 +0000 (20:41 -0800)]
ulti: convert to new bytestream API.

7 years agoswscale: Use standard multiple inclusion guards in ppc/ header files.
Diego Biurrun [Tue, 3 Jan 2012 09:29:19 +0000 (10:29 +0100)]
swscale: Use standard multiple inclusion guards in ppc/ header files.

7 years agoPlace some START_TIMER invocations in separate blocks.
Diego Biurrun [Tue, 3 Jan 2012 12:25:25 +0000 (13:25 +0100)]
Place some START_TIMER invocations in separate blocks.

This fixes compilation failures related to START_TIMER/STOP_TIMER macros and
-Werror=declaration-after-statement.  START_TIMER declares variables and thus
may not be placed after statements outside of a new block.

7 years agov4l2: list available formats
Luca Barbato [Tue, 27 Dec 2011 05:31:41 +0000 (06:31 +0100)]
v4l2: list available formats

Make use of the experimental framesize enumeration ioctl if available.

7 years agov4l2: set the proper codec_tag
Luca Barbato [Tue, 27 Dec 2011 06:41:01 +0000 (07:41 +0100)]
v4l2: set the proper codec_tag

Unbreak direct streamcopy.

7 years agov4l2: refactor device_open
Luca Barbato [Tue, 27 Dec 2011 05:27:41 +0000 (06:27 +0100)]
v4l2: refactor device_open

Check capabilities directly in the function, further simplify the code.

7 years agov4l2: simplify away io_method
Luca Barbato [Tue, 27 Dec 2011 04:52:02 +0000 (05:52 +0100)]
v4l2: simplify away io_method

Only mmap is supported.

7 years agov4l2: cosmetics
Luca Barbato [Tue, 27 Dec 2011 04:37:58 +0000 (05:37 +0100)]
v4l2: cosmetics

7 years agov4l2: uniform and format options
Luca Barbato [Tue, 27 Dec 2011 02:38:13 +0000 (03:38 +0100)]
v4l2: uniform and format options

7 years agov4l2: do not force interlaced mode
Luca Barbato [Mon, 21 Nov 2011 16:03:46 +0000 (17:03 +0100)]
v4l2: do not force interlaced mode

Video4linux2 supports both interlaced and non-interlaced mode, do not
ask for interlaced if not necessary.

7 years agoavio: exit early in fill_buffer without read_packet
Janne Grunau [Tue, 3 Jan 2012 17:11:36 +0000 (18:11 +0100)]
avio: exit early in fill_buffer without read_packet

Fixes an invalid free() with ass in avi. The sample in bug 98 passes
parts of AVPacket.data as buffer for the AVIOContext. Since the packet
is quite large fill_buffer tries to reallocate the buffer before doing
nothing. Fixes bug 98.

7 years agovc1dec: fix invalid memory access for small video dimensions
John Brooks [Sun, 11 Dec 2011 09:37:21 +0000 (02:37 -0700)]
vc1dec: fix invalid memory access for small video dimensions

For small video dimensions, these calculations of the upper bound
for pixel access may have a negative result. Using an unsigned
comparison to bound a potentially negative value only works if
the greater operand is non-negative. Fixed by doing edge emulation
when the upper bound is probably negative, everywhere that this
pattern appears.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
7 years agorv34: fix invalid memory access for small video dimensions
John Brooks [Wed, 4 Jan 2012 06:27:35 +0000 (23:27 -0700)]
rv34: fix invalid memory access for small video dimensions

For small video dimensions calculations of the upper bound for pixel
access may result in negative value. Using an unsigned comparison
works only if the greater operand is non-negative. This is fixed by
doing edge emulation explicitly for such conditions.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>