Commit Graph

36919 Commits

Author SHA1 Message Date
Anton Khirnov 93eaeb0244 FATE: add a tscc2 test. 2013-03-22 20:10:56 +01:00
Anton Khirnov 4e33582a0b tscc2: allocate AVFrame properly. 2013-03-22 20:10:48 +01:00
Jindřich Makovička 20a8ee3061 af_asyncts: fix compensation and PTS monotonicity
This patch improves af_asyncts behavior on streams with bogus PTS, which
are either non-monotonic, or contain PTS jitter, and trigger the
non-monotonicity error. With this patch, af_asyncts is able to correct
these streams and avoid the error.

Firstly, it fixes resample compensation calculation by supplying proper
units to avresample_set_compensation (sample count per second instead
of sample count per some arbitrary frame size). Also, the calculation of
the compensation itself is fixed - delta is proportional to an adjustment
of the compensation, not the compensation itself. Ideally, the compensation
should converge to a value that keeps delta at zero.

To be able to deal with sources with PTS jitter even without resampling,
small PTS errors are adjusted, so the output frames do not overlap.

Finally, one more monotonicity check is added.

The FATE reference changes because now there is 8 less samples of
silence because of the pts jitter.

Signed-off-by: Jindřich Makovička <makovick@gmail.com>
2013-03-22 20:09:34 +01:00
Hendrik Leppkes 1e8b9738fa avutil/frame: add all remaining frame properties to av_frame_copy_props
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-22 20:05:37 +01:00
Diego Biurrun 2e2ec66741 configure: Enable hwaccels without external dependencies by default. 2013-03-21 14:19:03 +01:00
Diego Biurrun 72ad96c854 doc/developer: Clarify symbol naming prefixes section. 2013-03-21 14:17:37 +01:00
Anton Khirnov fcf75022d7 h264: remove redundant freeing of DPB in h264_decode_end
free_tables() frees it already.
2013-03-21 10:21:11 +01:00
Anton Khirnov 23e85be58f h264: add a parameter to the CHROMA444 macro.
This way it does not look like a constant.
2013-03-21 10:21:02 +01:00
Anton Khirnov e962bd08ee h264: add a parameter to the CHROMA422 macro.
This way it does not look like a constant.
2013-03-21 10:20:58 +01:00
Anton Khirnov 6d2b6f21eb h264: add a parameter to the CABAC macro.
This way it does not look like a constant.
2013-03-21 10:20:52 +01:00
Anton Khirnov a6931d8ece h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.
This way it does not look like a constant.
2013-03-21 10:20:48 +01:00
Anton Khirnov 7fa00653a5 h264: add a parameter to the FIELD_PICTURE macro.
This way it does not look like a constant.
2013-03-21 10:20:44 +01:00
Anton Khirnov 7bece9b22f h264: add a parameter to the FRAME_MBAFF macro.
This way it does not look like a constant.
2013-03-21 10:20:39 +01:00
Anton Khirnov da6be8fcec h264: add a parameter to the MB_FIELD macro.
This way it does not look like a constant.
2013-03-21 10:20:35 +01:00
Anton Khirnov 82313eaa34 h264: add a parameter to the MB_MBAFF macro.
This way it does not look like a constant.
2013-03-21 10:20:30 +01:00
Anton Khirnov 48d0fd2d62 h264: merge common_init() into ff_h264_decode_init.
There is no point in keeping those separate.
2013-03-21 10:20:10 +01:00
Anton Khirnov 25408b2a06 h264: make ff_h264_frame_start static.
It is not called from outside h264.c
2013-03-21 10:19:54 +01:00
Janne Grunau 1c4073efd2 fate: add tests for h264 decoder reinit 2013-03-20 16:04:27 +01:00
Janne Grunau a157c7f2b8 h264: fix bit depth changes with frame threading
AVCodecContext.bits_per_raw_sample is updated from the previous thread
in the generic update function before the codec specific update_thread
function is called. The check for reinitialization of dsp functions uses
bits_per_raw_sample. When called from update_thread_context it will be
already at the current value and the dsp functions aren't updated if
only the bit depth changes.
2013-03-20 13:12:10 +01:00
Martin Storsjö a5e6080a8d rtmp: Pass the parameters to do_adobe_auth in the right order
do_adobe_auth takes the parameters in the order "opaque, challenge".

Due to the way they are treated, this didn't matter in the tested
setups though - if both are set, we only use one. In the tested
setups (Wowza and Akamai) either one of them were null or they
were both set to the same value, which is why this worked before.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-20 12:00:28 +02:00
Hendrik Leppkes c3ebfcd6e1 mpegvideo: allocate hwaccel privdata after the frame buffer
This ensures the hwaccel privdata does not leak when a frame buffer could
not be allocated (and toggle the assert when the frame is re-used).
Having no frame buffer available is quite common when using the DXVA2
hwaccel in situations where the DXVA2 renderer is being re-allocated, for
example when moving between displays.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-19 11:20:22 +01:00
Hendrik Leppkes 9c9ede44f3 h264: allocate hwaccel privdata after the frame buffer
This ensures the hwaccel privdata does not leak when a frame buffer could
not be allocated (and toggle the assert when the frame is re-used).
Having no frame buffer available is quite common when using the DXVA2
hwaccel in situations where the DXVA2 renderer is being re-allocated, for
example when moving between displays.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-19 11:20:00 +01:00
Hendrik Leppkes c71c80f53b pthread: unref already decoded frames when flushing the decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-19 11:19:08 +01:00
Hendrik Leppkes 4e70d66ded mpegvideo: fix allocation of the hwaccel_picture_private data
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-19 11:18:42 +01:00
Anton Khirnov 1516bf7af1 lavc: update the doxy for avcodec_decode_{video,audio} wtih refcounting. 2013-03-19 11:12:17 +01:00
Anton Khirnov 6599b087de buffersrc: fix a typo.
Vertical shift is log2_chroma_h, not log2_chroma_w.
2013-03-19 11:12:17 +01:00
Anton Khirnov c977039e58 lavc, lavfi: fix counting number of planes in AVBufferRef wrappers
Number of planes is not always equal to the number of components even
for formats marked with PIX_FMT_PLANAR -- e.g. NV12 has three components
in two planes.
2013-03-19 11:12:17 +01:00
Anton Khirnov 2c328a9079 pixdesc: add a function for counting planes in a pixel format. 2013-03-19 11:12:17 +01:00
Anton Khirnov e5c32d6da7 avplay: remove the -debug option.
It just shadows the corresponding AVOption and prevents using named
constants.
2013-03-19 11:12:13 +01:00
Anton Khirnov 3cd93cc7b8 Revert "asfenc: return error on negative timestamp"
This reverts commit d1bec33b46, it breaks
FATE.
2013-03-19 11:04:55 +01:00
Anton Khirnov 358628074c print_options: do not generate docs for options without enc or dec flags
Those are not usable from the avtools, so mentioning them in the
manpages just confuses the reader.
2013-03-18 15:36:25 +01:00
Anton Khirnov ce0124acac mpeg12: do not fail on zero dimensions in the sequence header.
The total frame size is a combination of the 12 bits in the sequence
header and 2 more bits in the the sequence extension. While the
specification explicitly forbids the dimensions from the sequence header
from being 0 (thus ruling out multiples of 4096), such videos
apparrently exist in the wild so we should attempt to decode them.

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

Fixes Bug 416.
2013-03-18 15:36:10 +01:00
Kostya Shishkov 50c449ac24 iff: validate CMAP palette size
Fixes CVE-2013-2495

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
2013-03-18 10:48:29 +01:00
Luca Barbato d1bec33b46 asfenc: return error on negative timestamp
According to the specification the timestamp is represented by a 32bit
unsigned.

CC: libav-stable@libav.org
2013-03-18 10:48:23 +01:00
Anton Khirnov 6552808014 lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers
It is supposed to be height * linesize, not width * linesize.
Thanks to Hendrik Leppkes for pointing out the bug.
2013-03-17 09:10:04 +01:00
Reinhard Tartler 23f4c5acc4 document the release process 2013-03-16 18:00:54 +01:00
Anton Khirnov 4750b05d67 af_join: do not leak input frames. 2013-03-16 05:37:01 +01:00
Anton Khirnov c2b9bd97f5 asrc_anullsrc: return EOF, not -1 2013-03-16 05:36:46 +01:00
Anton Khirnov f4281f4571 asrc_anullsrc: do not set samplerate and channel layout explicitly
They are auto-negotiated.
2013-03-16 05:36:35 +01:00
Anton Khirnov e4a7b2177d vf_showinfo: remove its useless init function
Filter private data is memset to 0 so there is no point in explicitly
initing anything to 0.
2013-03-16 05:36:14 +01:00
Anton Khirnov 4d67ff8e8e AVOptions: fix using named constants with child contexts.
The named constant needs to be searched for in the same object on which
the option is set, i.e. target_obj.
2013-03-16 05:35:33 +01:00
Anton Khirnov 9676b9a2cd AVOption: remove an unused function parameter. 2013-03-16 05:35:20 +01:00
Anton Khirnov ef4d34aa7e filters.texi: restore mistakenly removed section name for noformat 2013-03-16 05:35:02 +01:00
Anton Khirnov dd74e3ef33 avfiltergraph: use sizeof(var) instead of sizeof(type) 2013-03-16 05:34:20 +01:00
Anton Khirnov 42c7c61ab2 avfiltergraph: replace AVFilterGraph.filter_count with nb_filters
This is more consistent with the naming in the rest of Libav.
2013-03-16 05:33:23 +01:00
Anton Khirnov 556aab8f11 lavfi: use designated initializers in avfilter_class 2013-03-16 05:33:06 +01:00
Anton Khirnov aa3c779984 lavf: sanity check size in av_get/append_packet().
To avoid allocating ridiculous amounts of memory for corrupted files,
read the input in chunks limited to filesize or an arbitrary large
amount when that is not known (chosen to be 50M).
2013-03-15 20:05:04 +01:00
Xi Wang ca6c3f2c53 lzo: fix overflow checking in copy_backptr()
The check `src > dst' in the form `&c->out[-back] > c->out' invokes
pointer overflow, which is undefined behavior in C.

Remove the check.  Also replace `&c->out[-back] < c->out_start' with
a safe form `c->out - c->out_start < back' to avoid overflow.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-15 12:52:31 +01:00
Xi Wang 8425d693ee flacdec: simplify bounds checking in flac_probe()
Simplify `p->buf > p->buf + p->buf_size - 4' as `p->buf_size < 4'.
Avoid a possible out-of-bounds pointer, which is undefined behavior
in C.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-15 12:51:57 +01:00
Xi Wang eba1ff3130 atrac3: avoid oversized shifting in decode_bytes()
When `off' is 0, `0x537F6103 << 32' in the following expression invokes
undefined behavior, the result of which is not necessarily 0.

    (0x537F6103 >> (off * 8)) | (0x537F6103 << (32 - (off * 8)))

Avoid oversized shifting.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-15 12:51:10 +01:00