summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
...
* h264: avoid stuck buffer pointer in decode_nal_unitsJindřich Makovička2012-09-29
| | | | | | | | | | | | | | | | | | When decode_nal_units() previously encountered a NAL_END_SEQUENCE, and there are some junk bytes left in the input buffer, but no start codes, buf_index gets stuck 3 bytes before the end of the buffer. This can trigger an infinite loop in the caller code, eg. in try_decode_trame(), as avcodec_decode_video() then keeps returning zeroes, with 3 bytes of the input packet still available. With this change, the remaining bytes are skipped so the whole packet gets consumed. CC:libav-stable@libav.org Signed-off-by: Jindřich Makovička <makovick@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mpeg12: fix the semantics of the int* parameter of decode()Anton Khirnov2012-09-29
| | | | It is got_output, not data_size.
* mpeg12: move mpeg_decode_frame() lowerAnton Khirnov2012-09-29
| | | | Avoids a forward declaration of decode_chunks().
* avsdec: Set dimensions instead of relying on the demuxer.Michael Niedermayer2012-09-29
| | | | | | | | | | | The decode function assumes that the video will have those dimensions. Fixes CVE-2012-2801 CC:libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
* wmalosslessdec: Reset put bit buffer when num_saved_bits is reset.Michael Niedermayer2012-09-29
| | | | | | | | | Fixes CVE-2012-2799 CC:libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
* dfa: improve boundary checks in decode_dds1()Anton Khirnov2012-09-29
| | | | | | Fixes CVE-2012-2798 CC:libav-stable@libav.org
* wmalosslessdec: Fix reading too many bits in decode_channel_residues()Anton Khirnov2012-09-29
| | | | | | | | | | Fixes a part of CVE-2012-2795 CC:libav-stable@libav.org Based on a patch by Michael Niedermayer <michaelni@gmx.at> Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
* wmalosslessdec: fix a get_bits(0) in decode_ac_filterMichael Niedermayer2012-09-29
| | | | | | | | | Fixes a part of CVE-2012-2795 CC:libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
* wmalosslessdec: make MCLMS arrays big enough for what is written into them.Michael Niedermayer2012-09-29
| | | | | | | | | Fixes a part of CVE-2012-2795 CC:libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
* indeo4/5: check empty tile size in decode_mb_info().Anton Khirnov2012-09-29
| | | | | | | | | | | | | This prevents writing into a too small array if some parameters changed without the tile being reallocated. Based on a patch by Michael Niedermayer <michaelni@gmx.at> Fixes CVE-2012-2800 CC:libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
* ivi_common: make ff_ivi_process_empty_tile() static.Anton Khirnov2012-09-29
| | | | It's not used outside of ivi_common.c
* indeo5: check tile size in decode_mb_info().Michael Niedermayer2012-09-29
| | | | | | | | | | | | This prevents writing into a too small array if some parameters changed without the tile being reallocated. Fixes CVE-2012-2794 CC:libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
* indeo3: fix out of cell write.Anton Khirnov2012-09-29
| | | | | | | | Fixes CVE-2012-2776. CC:libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
* wmalosslessdec: increase channel_coeffs/residues sizeAnton Khirnov2012-09-29
| | | | | | Fixes CVE-2012-2792 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
* wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14.Anton Khirnov2012-09-29
|
* lagarith: check count before writing zeros.Michael Niedermayer2012-09-29
| | | | | | | Fixes CVE-2012-2793 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
* wmaprodec: check num_vec_coeffs for validityMichael Niedermayer2012-09-29
| | | | | | | Fixes CVE-2012-2789 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
* indeo4: update AVCodecContext width/height on size changeMichael Niedermayer2012-09-29
| | | | | | | Fixes CVE-2012-2787 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
* dfa: check that the caller set width/height properly.Anton Khirnov2012-09-29
| | | | Fixes CVE-2012-2786.
* indeo5dec: Make sure we have had a valid gop header.Michael Niedermayer2012-09-29
| | | | | | | | | This prevents decoding happening on a half initialized context. Fixes CVE-2012-2779 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
* cavsdec: check for changing w/h.Michael Niedermayer2012-09-29
| | | | | | | | | Our decoder does not support changing w/h. Fixes CVE-2012-2777 and CVE-2012-2784. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc: set channel count from channel layout in avcodec_open2().Anton Khirnov2012-09-29
| | | | | Some decoders (e.g. nellymoser) only set channel_layout and do not set channel count.
* dsputil_mmx: fix reading prior of the src array in sub_hfyu_median_prediction()Michael Niedermayer2012-09-28
| | | | | | This should fix the utvideoenc valgrind failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mpegaudiodec: fix short_start calculationLuca Barbato2012-09-28
| | | | | | | The value should be always 3, as it follows from the specification. Fix a stack buffer overflow in exponents_from_scale_factors as reported by asan. Thanks to Dale Curtis for the sample vector.
* libopus: Remap channels using libopus' internal remapping.Nathan Caldwell2012-09-28
| | | | | | | | This way we can directly remap channels from Opus' channel order to libav's internal channel order, instead of mapping channels from Opus' order to Vorbis' order then to libav's order. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Opus decoder using libopusNicolas George2012-09-28
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avcodec: document the use of AVCodecContext.delay for audio decodingNathan Caldwell2012-09-28
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* vc1dec: add flush function for WMV9 and VC-1 decodersKostya Shishkov2012-09-28
| | | | CC: libav-stable@libav.org
* h264_refs: Fix debug tprintf argument typesDiego Biurrun2012-09-27
|
* golomb: const correctness for get_ue()/get_se() function argumentsDiego Biurrun2012-09-27
|
* get_bits: const correctness for get_bits_trace()/get_xbits_trace() argumentsDiego Biurrun2012-09-27
|
* dwt: Drop unused functions spatial_compose{53|97}i()Diego Biurrun2012-09-27
|
* avcodec: Drop long-deprecated imgconvert.h headerDiego Biurrun2012-09-27
|
* Add Opus codec id and codec description.Andrew D'Addesio2012-09-27
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* truemotion2: Request samples for old TM2 headersDiego Biurrun2012-09-26
|
* xsub: feed init_get_bits the whole bufferAlexandre Colucci2012-09-25
| | | | | | | | | | | Do not use rlelen field for buffer size in init_get_bits, it is only the size of the data for the first field. Since it is not reliable, just use the size of the whole buffer. Additional comments add removal of unused rlelen variable by Reimar Döffinger. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* libfdk-aac: Allow setting VBR modes via a private optionMartin Storsjö2012-09-25
| | | | | | | | This avoids using the global_quality field and QSCALE flag for passing the VBR modes, since the value range of the global_quality field doesn't really map cleanly to this codec's VBR modes. Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aac: Warn the user that the VBR modes are unsupportedMartin Storsjö2012-09-25
| | | | | | | | | These modes were not originally exposed by the library at all. In practice, only a few of them work for each sample rate/profile combination, and they don't work at all for the more uncommon sample rates. Signed-off-by: Martin Storsjö <martin@martin.st>
* Revert "cbrt_tablegen: Include libm.h"Derek Buitenhuis2012-09-25
| | | | | | | This code runs on the host and should not use libm.h, which is meant for the target. This reverts commit 2768b717987d4e19d2774890d7d84aef531b1d9f.
* pthread: make sure AVFrame.extended_data is set properly.Anton Khirnov2012-09-25
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* libfdk-aac: reindent after last commitNathan Caldwell2012-09-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* libfdk-aac: Limit to supported sample rates.Nathan Caldwell2012-09-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* cbrt_tablegen: Include libm.hDerek Buitenhuis2012-09-24
| | | | | | Needed for cbrtf fallback on systems which lack it. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* libx264: change default to closed gop to match x264cliJohn Van Sickle2012-09-24
| | | | | | open-gop can be enabled with "-flags -cgop" Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Use avcodec_free_frame() to free AVFrames.Anton Khirnov2012-09-24
|
* lavc: add avcodec_free_frame().Anton Khirnov2012-09-24
| | | | | Since an AVFrame now has malloced members (extended_data), it must have a destructor.
* lavc: ensure extended_data is set properly on decodingAnton Khirnov2012-09-24
|
* lavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults()Anton Khirnov2012-09-24
|
* lavc: use av_mallocz to allocate AVFrames.Anton Khirnov2012-09-24
| | | | | Otherwise the frame is uninitialized, so avcodec_get_frame_defaults() cannot determine whether to free extended_data.
* lavc: rename the argument of avcodec_alloc_frame/get_frame_defaultsAnton Khirnov2012-09-24
| | | | | AVFrame is used for both audio and video, so calling the argument 'pic' is misleading.