ffmpeg.git
7 years agolavf: only set average frame rate for video.
Anton Khirnov [Tue, 13 Mar 2012 20:45:05 +0000 (21:45 +0100)]
lavf: only set average frame rate for video.

7 years agolavf: remove a pointless check.
Anton Khirnov [Tue, 13 Mar 2012 16:52:08 +0000 (17:52 +0100)]
lavf: remove a pointless check.

Timebase is already checked in avpriv_set_pts_info().

7 years agoavcodec: add XBM encoder
Paul B Mahol [Sat, 17 Mar 2012 17:43:58 +0000 (17:43 +0000)]
avcodec: add XBM encoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agoresample: allocate a large enough output buffer
Justin Ruggles [Wed, 14 Mar 2012 17:01:32 +0000 (13:01 -0400)]
resample: allocate a large enough output buffer

Fixes invalid writes and crashes when doing conversions such as stereo to 5.1
channels or sample rate conversion on 5.1 channels.

7 years agofate: fix enc_dec_pcm tests with remote target
Mans Rullgard [Sat, 17 Mar 2012 16:22:47 +0000 (16:22 +0000)]
fate: fix enc_dec_pcm tests with remote target

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agowmaenc: remove bit-exact hack
Justin Ruggles [Sat, 17 Mar 2012 15:42:49 +0000 (11:42 -0400)]
wmaenc: remove bit-exact hack

It may have improved cross-platform stability, but wasn't the only place in
the encoder with bitexact issues. It is no longer needed because we have FATE
tests for float encoders using fuzzy comparison.

7 years agoFATE: remove WMA acodec tests
Justin Ruggles [Sat, 17 Mar 2012 15:35:18 +0000 (11:35 -0400)]
FATE: remove WMA acodec tests

7 years agoFATE: add WMAv1 and WMAv2 encode/decode tests with fuzzy comparison
Justin Ruggles [Fri, 9 Mar 2012 02:53:39 +0000 (21:53 -0500)]
FATE: add WMAv1 and WMAv2 encode/decode tests with fuzzy comparison

7 years agoFATE: add AC-3 and E-AC-3 encode/decode tests with fuzzy comparison
Justin Ruggles [Sat, 10 Mar 2012 20:36:34 +0000 (15:36 -0500)]
FATE: add AC-3 and E-AC-3 encode/decode tests with fuzzy comparison

7 years agoqtrle: Use bytestream2 functions to prevent buffer overreads.
Aneesh Dogra [Thu, 15 Mar 2012 19:13:23 +0000 (00:43 +0530)]
qtrle: Use bytestream2 functions to prevent buffer overreads.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agovqavideo: check malloc return values
Paul B Mahol [Fri, 16 Mar 2012 13:23:57 +0000 (13:23 +0000)]
vqavideo: check malloc return values

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agox11grab: fix a memory leak exposed by valgrind
Antonio Ospite [Fri, 16 Mar 2012 21:23:34 +0000 (22:23 +0100)]
x11grab: fix a memory leak exposed by valgrind

When using "-f x11grab -i :0.0" valgrind reports a definitely lost
memory block with this message:

==31544== 5 bytes in 1 blocks are definitely lost in loss record 1 of 2
==31544==    at 0x4026E68: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==31544==    by 0x4026F17: posix_memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==31544==    by 0x60D399A: av_malloc (in /usr/lib/x86_64-linux-gnu/libavutil.so.51.22.1)
==31544==    by 0x60D3A70: av_strdup (in /usr/lib/x86_64-linux-gnu/libavutil.so.51.22.1)
==31544==    by 0x4A2BE58: ??? (in /usr/lib/x86_64-linux-gnu/libavdevice.so.53.2.0)
==31544==    by 0x506D29E: avformat_open_input (in /usr/lib/x86_64-linux-gnu/libavformat.so.53.21.0)
==31544==    by 0x400A80: main (in /home/ao2/WIP/am7xxx-play/tests/a.out)

The 5 bytes lost are the ones from param = av_strdup(":0.0"), so let's
free param in the exit path.

Also check the av_strdup() return value.

Note: calling av_free(param) even when av_strdup() fails and param is
NULL is OK and keeps the code simpler without adding another label to
skip av_free().

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agothreads: fix old frames returned after avcodec_flush_buffers()
Uoti Urpala [Fri, 16 Mar 2012 03:42:26 +0000 (05:42 +0200)]
threads: fix old frames returned after avcodec_flush_buffers()

Calling avcodec_flush_buffers() and then avcodec_decode_video2() with
a 0-sized packet (to get remaining buffered frames) could incorrectly
return an old frame from before the avcodec_flush_buffers() call. Add
a loop in ff_thread_flush() to zero the got_frame field of each thread
to ensure the old frames will not be returned.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoMPV: always mark dummy frames as reference
Janne Grunau [Fri, 16 Mar 2012 13:08:17 +0000 (14:08 +0100)]
MPV: always mark dummy frames as reference

If the dummy frame are not created from a reference frame they could
be deleted untimely resulting in multithreaded decoder waiting on
the current frame to finish.
Noticed by Ronald S. Bultje in the RV34 decoder with a broken file.

7 years agoh264: fix deadlocks on incomplete reference frame decoding.
Ronald S. Bultje [Fri, 16 Mar 2012 22:24:08 +0000 (15:24 -0700)]
h264: fix deadlocks on incomplete reference frame decoding.

If decoding a second complementary field, and the first was
decoded in our thread, mark decoding of that field as complete.
If decoding fails, mark the decoded field/frame as complete.
Do not allow switching between field modes or field/frame mode
between slices within the same field/frame. Ensure that two
subsequent fields cover top/bottom (rather than top/frame,
bottom/frame or such nonsense situations).

Fixes various deadlocks when decoding samples with errors in
reference frames.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agompeg4: report frame decoding completion at ff_MPV_frame_end().
Ronald S. Bultje [Fri, 16 Mar 2012 21:16:56 +0000 (14:16 -0700)]
mpeg4: report frame decoding completion at ff_MPV_frame_end().

Prevents hangs on corrupt input.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agomimic: don't use self as reference, and report completion at end of decode().
Ronald S. Bultje [Fri, 16 Mar 2012 21:04:00 +0000 (14:04 -0700)]
mimic: don't use self as reference, and report completion at end of decode().

Fixes hangs on corrupt samples that reference self-frames.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoh264: K&R formatting cosmetics
Diego Biurrun [Fri, 16 Mar 2012 17:40:05 +0000 (18:40 +0100)]
h264: K&R formatting cosmetics

Also remove some disabled code and fix a few comment typos.

7 years agos3tc.h: Add missing #include to fix standalone header compilation.
Diego Biurrun [Fri, 16 Mar 2012 17:50:15 +0000 (18:50 +0100)]
s3tc.h: Add missing #include to fix standalone header compilation.

7 years agoFATE: add capability for audio encode/decode tests with fuzzy psnr comparison
Justin Ruggles [Sat, 10 Mar 2012 21:37:41 +0000 (16:37 -0500)]
FATE: add capability for audio encode/decode tests with fuzzy psnr comparison

This allows for testing floating-point audio encoders across different
platforms where exact comparisons are unreliable due to float rounding
differences.

7 years agoFATE: allow a tolerance in the size comparison in do_tiny_psnr()
Justin Ruggles [Sun, 11 Mar 2012 00:52:05 +0000 (19:52 -0500)]
FATE: allow a tolerance in the size comparison in do_tiny_psnr()

This will allow for comparing decoded output to the original source when the
decoded size is not exactly the same as the original size.

7 years agoFATE: use absolute difference from a target value in do_tiny_psnr()
Justin Ruggles [Sun, 11 Mar 2012 00:33:34 +0000 (19:33 -0500)]
FATE: use absolute difference from a target value in do_tiny_psnr()

This will allow comparison to original pre-encoded content instead of
comparing to expected decoded output.

7 years agoFATE: allow tests to set CMP_SHIFT to pass to tiny_psnr
Justin Ruggles [Sat, 10 Mar 2012 23:53:19 +0000 (18:53 -0500)]
FATE: allow tests to set CMP_SHIFT to pass to tiny_psnr

This will allow adjusting for any encoder or decoder delay when doing
comparisons.

7 years agoFATE: use $fuzz directly in do_tiny_psnr() instead of passing it around
Justin Ruggles [Sat, 10 Mar 2012 23:50:45 +0000 (18:50 -0500)]
FATE: use $fuzz directly in do_tiny_psnr() instead of passing it around

7 years agodxa: remove useless code
Paul B Mahol [Thu, 15 Mar 2012 01:36:45 +0000 (01:36 +0000)]
dxa: remove useless code

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agolavf: don't select an attached picture as default stream for seeking.
Anton Khirnov [Thu, 15 Mar 2012 08:04:41 +0000 (09:04 +0100)]
lavf: don't select an attached picture as default stream for seeking.

7 years agoavconv: remove pointless checks.
Anton Khirnov [Wed, 14 Mar 2012 06:56:26 +0000 (07:56 +0100)]
avconv: remove pointless checks.

OutputStream.picref is guaranteed to be non-NULL if
get_filtered_video_frame() succeeds.

7 years agoavconv: check for get_filtered_frame() failure.
Anton Khirnov [Wed, 14 Mar 2012 06:55:27 +0000 (07:55 +0100)]
avconv: check for get_filtered_frame() failure.

7 years agoavconv: remove a pointless check.
Anton Khirnov [Wed, 14 Mar 2012 06:50:30 +0000 (07:50 +0100)]
avconv: remove a pointless check.

output_video_filter is always guaranteed to be set and is in fact
dereferenced right above the check.

7 years agoswscale: convert hscale() to use named arguments.
Ronald S. Bultje [Tue, 13 Mar 2012 04:19:02 +0000 (21:19 -0700)]
swscale: convert hscale() to use named arguments.

7 years agox86inc: add *mp named argument support to DEFINE_ARGS.
Ronald S. Bultje [Mon, 12 Mar 2012 05:11:28 +0000 (22:11 -0700)]
x86inc: add *mp named argument support to DEFINE_ARGS.

7 years agoswscale: convert hscale to cpuflags().
Ronald S. Bultje [Mon, 12 Mar 2012 01:11:40 +0000 (18:11 -0700)]
swscale: convert hscale to cpuflags().

7 years agoh264: stricter reference limit enforcement.
Ronald S. Bultje [Tue, 13 Mar 2012 23:26:44 +0000 (16:26 -0700)]
h264: stricter reference limit enforcement.

Progressive images can have only 16 references, error out if there are
more, since the data is almost certainly corrupt, and the invalid value
will lead to random crashes or invalid writes later on.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoh264: increase reference poc list from 16 to 32.
Ronald S. Bultje [Tue, 13 Mar 2012 22:21:07 +0000 (15:21 -0700)]
h264: increase reference poc list from 16 to 32.

Interlaced images can have 32 references (16 per field), so limiting the
array size to 16 leads to invalid writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoxa_adpcm: limit filter to prevent xa_adpcm_table[] array bounds overruns.
Ronald S. Bultje [Tue, 13 Mar 2012 19:28:35 +0000 (12:28 -0700)]
xa_adpcm: limit filter to prevent xa_adpcm_table[] array bounds overruns.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
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
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agosnow: reject unsupported chroma shifts.
Michael Niedermayer [Fri, 9 Mar 2012 23:08:32 +0000 (00:08 +0100)]
snow: reject unsupported chroma shifts.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoAdd ffvhuff encoding and decoding regression test
Paul B Mahol [Wed, 14 Mar 2012 20:15:34 +0000 (20:15 +0000)]
Add ffvhuff encoding and decoding regression test

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoanm: convert to bytestream2 API
Paul B Mahol [Tue, 13 Mar 2012 18:13:38 +0000 (18:13 +0000)]
anm: convert to bytestream2 API

Protects from overreads.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agobytestream: add more unchecked variants for bytestream2 API
Paul B Mahol [Tue, 13 Mar 2012 14:14:59 +0000 (14:14 +0000)]
bytestream: add more unchecked variants for bytestream2 API

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agojvdec: unbreak video decoding
Paul B Mahol [Wed, 14 Mar 2012 03:02:02 +0000 (03:02 +0000)]
jvdec: unbreak video decoding

The safe bitstream reader broke it since the buffer size was specified
in bytes instead of bits.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
CC: libav-stable@libav.org
7 years agojv demux: set video stream duration
Paul B Mahol [Wed, 14 Mar 2012 03:14:01 +0000 (03:14 +0000)]
jv demux: set video stream duration

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agofate: add pam image regression test
Paul B Mahol [Wed, 14 Mar 2012 03:47:52 +0000 (03:47 +0000)]
fate: add pam image regression test

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agodoc/general: update supported devices table.
Anton Khirnov [Tue, 13 Mar 2012 11:43:47 +0000 (12:43 +0100)]
doc/general: update supported devices table.

Add libcdio and fbdev, remove v4l1.

7 years agodoc/general: add missing @tab to codecs table.
Anton Khirnov [Tue, 13 Mar 2012 11:39:05 +0000 (12:39 +0100)]
doc/general: add missing @tab to codecs table.

7 years agoh264: Fix invalid interlaced/progressive MB combinations for direct mode prediction.
Michael Niedermayer [Tue, 13 Mar 2012 01:26:50 +0000 (18:26 -0700)]
h264: Fix invalid interlaced/progressive MB combinations for direct mode prediction.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoavconv: reindent
Anton Khirnov [Mon, 12 Mar 2012 16:43:48 +0000 (17:43 +0100)]
avconv: reindent

CC: libav-stable@libav.org
7 years agoavconv: link '-passlogfile' option to libx264 'stats' AVOption.
Anton Khirnov [Mon, 12 Mar 2012 16:42:57 +0000 (17:42 +0100)]
avconv: link '-passlogfile' option to libx264 'stats' AVOption.

Fixes bug 204.

CC: libav-stable@libav.org
7 years agolibx264: add 'stats' private option for setting 2pass stats filename.
Anton Khirnov [Mon, 12 Mar 2012 16:20:20 +0000 (17:20 +0100)]
libx264: add 'stats' private option for setting 2pass stats filename.

x264 always opens the file itself with fopen, so we cannot use the
standard lavc stats mechanism.

CC: libav-stable@libav.org
7 years agolibx264: fix help text for slice-max-size option.
Anton Khirnov [Mon, 12 Mar 2012 16:09:22 +0000 (17:09 +0100)]
libx264: fix help text for slice-max-size option.

CC: libav-stable@libav.org
7 years agohttp: Clear the auth state on redirects
Martin Storsjö [Mon, 12 Mar 2012 12:03:46 +0000 (14:03 +0200)]
http: Clear the auth state on redirects

Currently we only try continuing with the same auth mechanism
as the initial request.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agohttp: Retry auth if it failed due to being stale
Martin Storsjö [Mon, 12 Mar 2012 12:00:16 +0000 (14:00 +0200)]
http: Retry auth if it failed due to being stale

Allow up to 4 retries for normal requests, where both the
proxy and the target server might need to authenticate.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortsp: Resend new keepalive commands if they used stale auth
Martin Storsjö [Mon, 12 Mar 2012 14:11:22 +0000 (16:11 +0200)]
rtsp: Resend new keepalive commands if they used stale auth

These commands are sent asynchronously, not waiting for the reply.
This reply is parsed later by ff_rtsp_tcp_read_packet or
udp_read_packet. If the reply indicates that we used stale
authentication and need to use a new nonce, resend a new keepalive
command immediately.

This is the only request sent asynchronously, so currently there's
no other command that needs to be resent in the same way.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortsp: Retry authentication if failed due to being stale
Martin Storsjö [Mon, 12 Mar 2012 11:59:53 +0000 (13:59 +0200)]
rtsp: Retry authentication if failed due to being stale

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agohttpauth: Parse the stale field in digest auth
Martin Storsjö [Mon, 12 Mar 2012 11:59:36 +0000 (13:59 +0200)]
httpauth: Parse the stale field in digest auth

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agodxva2_vc1: pass the overlap flag to the decoder
Hendrik Leppkes [Fri, 20 Jan 2012 14:19:44 +0000 (15:19 +0100)]
dxva2_vc1: pass the overlap flag to the decoder

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agodxva2_vc1: fix decoding of BI frames
Hendrik Leppkes [Fri, 20 Jan 2012 14:19:24 +0000 (15:19 +0100)]
dxva2_vc1: fix decoding of BI frames

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agoFATE: add shorthand to wavpack test
Paul B Mahol [Tue, 13 Mar 2012 03:09:25 +0000 (03:09 +0000)]
FATE: add shorthand to wavpack test

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agodfa: convert to bytestream2 API
Paul B Mahol [Tue, 13 Mar 2012 01:58:12 +0000 (01:58 +0000)]
dfa: convert to bytestream2 API

Protects from overreads.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoanm decoder: move buffer allocation from decode_init() to decode_frame()
Peter Ross [Mon, 12 Mar 2012 23:42:53 +0000 (23:42 +0000)]
anm decoder: move buffer allocation from decode_init() to decode_frame()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoh264: improve parsing of broken AVC SPS
Michael Niedermayer [Sat, 1 Oct 2011 15:41:28 +0000 (17:41 +0200)]
h264: improve parsing of broken AVC SPS

Parsing the entire NAL as SPS fixes decoding of some AVC bitstreams
with broken escaping. Since the size of the NAL unit is known and
checked against the buffer end we can parse it entirely without buffer
overreads.

Fixes playback of
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agopcm-mpeg: convert to bytestream2 API
Paul B Mahol [Mon, 12 Mar 2012 20:09:04 +0000 (20:09 +0000)]
pcm-mpeg: convert to bytestream2 API

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
7 years agoRevert "h264: clear trailing bits in partially parsed NAL units"
Janne Grunau [Mon, 12 Mar 2012 21:01:02 +0000 (22:01 +0100)]
Revert "h264: clear trailing bits in partially parsed NAL units"

This reverts commit 729ebb2f185244b0ff06d48edbbbbb02ceb4ed4e.

There was an off-by-one error in the bit mask calculation clearing
actually the last valid bit and causing
http://bugzilla.libav.org/show_bug.cgi?id=227

The broken sample (Mr_MrsSmith-h264_aac.mp4) the commit was fixing
does not work after correcting the off-by-one error.

CC: libav-stable@libav.org
7 years agoremove iwmmxt optimizations
Janne Grunau [Fri, 9 Mar 2012 14:21:15 +0000 (15:21 +0100)]
remove iwmmxt optimizations

The were broken since August of 2010 without anyone noticing until
three weeks ago. Nobody cares about it anymore and hopefully Marvell
will support NEON like in the PXA978 from now on.

7 years agomimic: do not continue if swap_buf_size is 0
Paul B Mahol [Mon, 12 Mar 2012 14:56:41 +0000 (14:56 +0000)]
mimic: do not continue if swap_buf_size is 0

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agomimic: convert to bytestream2 API
Paul B Mahol [Mon, 12 Mar 2012 14:56:40 +0000 (14:56 +0000)]
mimic: convert to bytestream2 API

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agofrwu: use MKTAG to check marker instead of AV_RL32
Paul B Mahol [Mon, 12 Mar 2012 18:11:32 +0000 (18:11 +0000)]
frwu: use MKTAG to check marker instead of AV_RL32

Using intreadwrite.h for this is overkill.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agotxd: port to bytestream2 API
Paul B Mahol [Mon, 12 Mar 2012 17:37:02 +0000 (17:37 +0000)]
txd: port to bytestream2 API

Protects against overreads.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoc93: convert to bytestream2 API
Paul B Mahol [Mon, 12 Mar 2012 14:27:04 +0000 (14:27 +0000)]
c93: convert to bytestream2 API

Protects against overreads.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoiff: make .long_name more descriptive
Paul B Mahol [Fri, 9 Mar 2012 01:49:53 +0000 (01:49 +0000)]
iff: make .long_name more descriptive

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoFATE: add test for cdxl demuxer
Paul B Mahol [Fri, 9 Mar 2012 20:49:56 +0000 (20:49 +0000)]
FATE: add test for cdxl demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agortsp: Fix a typo
Martin Storsjö [Mon, 12 Mar 2012 14:07:33 +0000 (16:07 +0200)]
rtsp: Fix a typo

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agodsicinvideo: validate buffer offset before copying pixels.
Ronald S. Bultje [Sun, 11 Mar 2012 14:28:54 +0000 (07:28 -0700)]
dsicinvideo: validate buffer offset before copying pixels.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agocook: error out on quant_index values outside [-63, 63] range.
Ronald S. Bultje [Sun, 11 Mar 2012 01:51:28 +0000 (17:51 -0800)]
cook: error out on quant_index values outside [-63, 63] range.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agompc: pad mpc_CC/SCF[] tables to allow for negative indices.
Ronald S. Bultje [Sat, 10 Mar 2012 22:28:08 +0000 (14:28 -0800)]
mpc: pad mpc_CC/SCF[] tables to allow for negative indices.

MPC8 allows indices of mpc_CC up to -1, and mpc_SCF up to -6, thus pad
the tables by that much on the left end.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agocook: expand dither_tab[], and make sure indexes into it don't overflow.
Ronald S. Bultje [Fri, 9 Mar 2012 01:09:27 +0000 (17:09 -0800)]
cook: expand dither_tab[], and make sure indexes into it don't overflow.

Fixes overflows in accessing dither_tab[].

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoxxan: reindent xan_unpack_luma().
Ronald S. Bultje [Fri, 9 Mar 2012 00:32:49 +0000 (16:32 -0800)]
xxan: reindent xan_unpack_luma().

It used 3-space indent instead of 4-space indent.

7 years agoxxan: protect against chroma LUT overreads.
Ronald S. Bultje [Sat, 10 Mar 2012 19:57:17 +0000 (11:57 -0800)]
xxan: protect against chroma LUT overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoxxan: convert to bytestream2 API.
Ronald S. Bultje [Fri, 9 Mar 2012 00:32:47 +0000 (16:32 -0800)]
xxan: convert to bytestream2 API.

Protects against overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoxxan: don't read before start of buffer in av_memcpy_backptr().
Ronald S. Bultje [Fri, 9 Mar 2012 00:32:46 +0000 (16:32 -0800)]
xxan: don't read before start of buffer in av_memcpy_backptr().

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agovp8: convert mbedge loopfilter x86 assembly to use named arguments.
Ronald S. Bultje [Mon, 5 Mar 2012 04:21:22 +0000 (20:21 -0800)]
vp8: convert mbedge loopfilter x86 assembly to use named arguments.

7 years agovp8: convert inner loopfilter x86 assembly to use named arguments.
Ronald S. Bultje [Mon, 5 Mar 2012 00:17:14 +0000 (16:17 -0800)]
vp8: convert inner loopfilter x86 assembly to use named arguments.

7 years agoFix a bunch of common typos.
Diego Biurrun [Wed, 25 Jan 2012 11:25:11 +0000 (12:25 +0100)]
Fix a bunch of common typos.

7 years agobuild: Skip compiling xvmc.h under the correct condition.
Diego Biurrun [Thu, 8 Mar 2012 22:53:20 +0000 (23:53 +0100)]
build: Skip compiling xvmc.h under the correct condition.

7 years agoconfigure: darwin: Change dylib install names to include major version.
Gil Pedersen [Wed, 7 Mar 2012 16:03:06 +0000 (17:03 +0100)]
configure: darwin: Change dylib install names to include major version.

This will cause linkers to link against the major lib names, instead of the
base names, allowing multiple major versions of the libraries to co-exist.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agompegts: Always honor a registration descriptor if present and there is no other codec...
Alex Converse [Thu, 8 Mar 2012 21:36:51 +0000 (13:36 -0800)]
mpegts: Always honor a registration descriptor if present and there is no other codec information.

7 years agoaacdec: Fix SCE parity check.
Michael Niedermayer [Wed, 7 Mar 2012 01:30:09 +0000 (17:30 -0800)]
aacdec: Fix SCE parity check.

An unpaired SCE preceding a CPE only makes sense for front SCEs
preceding the first CPE.

Split from FFmpeg commit a8d67efa53dae1d14614e3a7bd4e77e4eab066ab

Signed-off-by: Alex Converse <alex.converse@gmail.com>
7 years agoaacdec: Fix out of array writes (stack).
Michael Niedermayer [Wed, 7 Mar 2012 01:26:29 +0000 (17:26 -0800)]
aacdec: Fix out of array writes (stack).

Set the element to channel vector (e2c_vec) size to be the maximum
number of aac channel elements. This makes it slightly larger than it
needs to be because CCEs are never mapped to output channel locations.

Also add a check that all input tags (legal or not) will fit.

Split from FFmpeg commit a8d67efa53dae1d14614e3a7bd4e77e4eab066ab

Signed-off-by: Alex Converse <alex.converse@gmail.com>
7 years agortsp: Only set the ttl parameter if the server actually gave a value
Martin Storsjö [Thu, 8 Mar 2012 13:32:39 +0000 (15:32 +0200)]
rtsp: Only set the ttl parameter if the server actually gave a value

Passing ttl=0 to the rtp/udp url contexts makes packets never
leave the host machine.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoudp: Set ttl for read-write streams, too, not only for write-only ones
Martin Storsjö [Thu, 8 Mar 2012 13:31:45 +0000 (15:31 +0200)]
udp: Set ttl for read-write streams, too, not only for write-only ones

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoudp: Only bind to the multicast address if in read-only mode
Martin Storsjö [Thu, 8 Mar 2012 13:17:15 +0000 (15:17 +0200)]
udp: Only bind to the multicast address if in read-only mode

This fixes sending back RTCP RR packets if receiving RTP over
multicast.

If the multicast stream is sent on demand (set up and signalled
via RTSP), the sender might depend on getting RTCP RR packets
knowing that there are listeners, otherwise the stream can be
closed after a certain timeout.

This fixes receiving RTSP streams over multicast on unix, from
certain Axis cameras.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoudp: Clarify the comment about binding the multicast address
Martin Storsjö [Thu, 8 Mar 2012 13:15:11 +0000 (15:15 +0200)]
udp: Clarify the comment about binding the multicast address

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoudp: Reorder comments
Martin Storsjö [Wed, 7 Mar 2012 22:38:02 +0000 (00:38 +0200)]
udp: Reorder comments

When this code was added in 36b532815cb83, the new code was added
between the existing comment and the existing line of code, making
the old comment seem to refer to the new code. This makes it read
correctly.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agottadec: unbreak playback of matroska files
Paul B Mahol [Tue, 6 Mar 2012 20:26:48 +0000 (20:26 +0000)]
ttadec: unbreak playback of matroska files

Matroska demuxer needs to recreate tta header, so just display
crc error without aborting.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agovorbisdec: avoid invalid memory access
Aaron Colwell [Wed, 7 Mar 2012 22:51:00 +0000 (14:51 -0800)]
vorbisdec: avoid invalid memory access

This fixes some invalid memory access caused later in the function
by res_chan[] not being set for all channels. This happens when a
channel doesn't appear a submap. This change simply returns a
decoder error when this situation is detected.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoFix uninitialized reads on malformed ogg files.
Dale Curtis [Wed, 7 Mar 2012 22:26:58 +0000 (14:26 -0800)]
Fix uninitialized reads on malformed ogg files.

The ogg decoder wasn't padding the input buffer with the appropriate
FF_INPUT_BUFFER_PADDING_SIZE bytes. Which led to uninitialized reads in
various pieces of parsing code when they thought they had more data than
they actually did.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agohuffyuv: add padding to classic (v1) huffman tables.
Ronald S. Bultje [Thu, 8 Mar 2012 00:29:23 +0000 (16:29 -0800)]
huffyuv: add padding to classic (v1) huffman tables.

We slightly overread the input buffer, so we require
padding at the end of the buffer, as is documented in the
get_bits API. Without padding, we'll read uninitialized
data or beyond the end of the .rodata, which may crash.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agopng: convert to bytestream2 API.
Ronald S. Bultje [Thu, 8 Mar 2012 00:16:20 +0000 (16:16 -0800)]
png: convert to bytestream2 API.

Protects against overreads in the input buffer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agodca: include libavutil/mathematics.h for possibly missing M_SQRT1_2
Kostya Shishkov [Wed, 7 Mar 2012 19:07:17 +0000 (20:07 +0100)]
dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2

7 years agoavs: fix infinite loop on end-of-stream.
Ronald S. Bultje [Thu, 16 Feb 2012 00:21:34 +0000 (16:21 -0800)]
avs: fix infinite loop on end-of-stream.

The codec would keep returning the last decoded frame if the stream
contains B-frames, since it wouldn't clear that frame from the list of
frames to be returned to the user.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org