summaryrefslogtreecommitdiffstats
path: root/libavcodec/shorten.c
Commit message (Collapse)AuthorAgeFilesLines
* shorten: pad the internal bitstream bufferAnton Khirnov2014-02-041-1/+1
| | | | | | | Fixes invalid reads. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
* avcodec: Use av_reallocp where suitableAlexandra Khirnova2013-12-091-17/+10
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* shorten: Fix out-of-array readTim Walker2013-10-101-1/+1
| | | | | | pred_order == FF_ARRAY_ELEMS(fixed_coeffs) is invalid too. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* shorten: Extend fixed_coeffs to properly support pred_order 0Luca Barbato2013-10-091-2/+8
| | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-031-1/+1
|
* shorten: Break out of loop looking for fmt chunk if none is foundMartin Storsjö2013-09-121-0/+4
| | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* shorten: Use a checked bytestream reader for the wave headerMartin Storsjö2013-09-121-13/+16
| | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc decoders: work with refcounted frames.Anton Khirnov2013-03-081-1/+1
|
* shorten: use the unsigned type where neededLuca Barbato2013-03-061-4/+9
| | | | | | get_uint returns an unsigned value, use an unsigned to store blocksize to make sure the comparison logic is correct and report correctly the error for the channel count not supported.
* shorten: report meaningful errorsLuca Barbato2013-03-061-14/+14
|
* shorten: K&R formatting cosmeticsLuca Barbato2013-03-061-106/+113
|
* shorten: set invalid channels count to 0Michael Niedermayer2013-03-061-0/+1
| | | | | | | | Prevent the loop shorten_decode_close from writing and freeing out of the array boundary. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* shorten: decode directly to the user-provided AVFrameJustin Ruggles2013-02-121-9/+5
|
* shorten: fix array subscript is below array bounds warningLuca Barbato2013-01-281-1/+1
| | | | Incidentally fixes alpha builds.
* miscellaneous typo fixesDiego Biurrun2012-12-211-1/+2
|
* lavc: add a wrapper for AVCodecContext.get_buffer().Anton Khirnov2012-12-041-1/+2
| | | | It will be useful in the upcoming transition to refcounted AVFrames.
* shorten: validate that the channel count in the header is not <= 0Justin Ruggles2012-11-011-1/+1
|
* shorten: use planar sample formatJustin Ruggles2012-10-141-9/+14
|
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-1/+1
|
* cosmetics: Align codec declarationsMartin Storsjö2012-04-061-1/+1
| | | | | | | Also break some long lines, remove codec function placeholder comments and add spaces in sample/pixel format lists. Signed-off-by: Martin Storsjö <martin@martin.st>
* shorten: Use separate pointers for the allocated memory for decoded samples.Michael Niedermayer2012-02-161-6/+8
| | | | | | | | | | | Fixes invalid free() if any of the buffers are not allocated due to either not decoding a header or an error prior to allocating all buffers. Fixes CVE-2012-0858 CC: libav-stable@libav.org Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* shorten: avoid abort() on unknown audio typesJohn Brooks2011-12-081-3/+5
| | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* shorten: remove dead initializationPaul B. Mahol2011-12-041-1/+0
| | | | Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* Add avcodec_decode_audio4().Justin Ruggles2011-12-021-19/+26
| | | | | | Deprecate avcodec_decode_audio3(). Implement audio support in avcodec_default_get_buffer(). Implement the new audio decoder API in all audio decoders.
* shorten: do not modify samples pointer when interleavingJustin Ruggles2011-11-111-3/+4
|
* shorten: fix end-of-stream decoding.Justin Ruggles2011-10-201-14/+33
| | | | | | | | | | | | enable CODEC_CAP_DELAY to flush any remaining frames in the buffer. Stop decoding when the FN_QUIT command is found so that a trailing seek table isn't decoded as a normal frame. decode all channels in the same call to avcodec_decode_audio3() so that decoding will not stop after the first channel of the last frame. Updated FATE reference. More valid audio is now decoded.
* shorten: do not use block size to determine whether to read the header.Justin Ruggles2011-10-201-2/+4
|
* shorten: check output buffer size before decodingJustin Ruggles2011-10-201-1/+7
|
* shorten: use av_clip_int16() for output sample clippingJustin Ruggles2011-10-201-1/+1
|
* shorten: use bytestream functions to decode the embedded WAVE headerJustin Ruggles2011-10-201-26/+17
|
* shorten: add some commentsJustin Ruggles2011-10-201-0/+18
|
* shorten: merge decoding of FN_DIFF* subblocks into decode_subframe_lpc()Justin Ruggles2011-10-201-44/+39
|
* cosmetics: remove some needless commented-out stuffJustin Ruggles2011-10-201-2/+0
|
* shorten: validate block sizeJustin Ruggles2011-10-201-2/+15
|
* shorten: move declaration of 'ret' to top of shorten_decode_frame()Justin Ruggles2011-10-201-2/+2
|
* shorten: pass on error value from allocate_buffers() instead of returning -1Justin Ruggles2011-10-201-3/+3
|
* shorten: check for realloc failureJustin Ruggles2011-10-201-3/+17
|
* shorten: move decoding of prediction order and applying of global offset toJustin Ruggles2011-10-201-17/+27
| | | | decode_subframe_lpc().
* shorten: only calculate output size when returning decoded samples, otherwiseJustin Ruggles2011-10-201-4/+6
| | | | just set data_size to zero.
* cosmetics: reindentJustin Ruggles2011-10-201-81/+81
|
* shorten: separate processing of audio commands from non-audio commandsJustin Ruggles2011-10-201-34/+39
|
* shorten: skip some fields in the WAV header embedded in the shorten header.Justin Ruggles2011-10-201-3/+4
| | | | | fixes incorrect bitrate reporting and potential misreporting of the number of channels.
* shorten: split reading of file header into a separate functionsJustin Ruggles2011-10-201-61/+70
|
* shorten: remove the flush function.Justin Ruggles2011-10-131-8/+0
| | | | The shorten decoder does not support seeking.
* shorten: Fix out of bound writes in fix_bitshift()Laurent Aimar2011-10-071-1/+1
| | | | | | The data pointers s->decoded[*] already take into account s->nwrap. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* shorten: Prevent block size from increasingLaurent Aimar2011-10-071-2/+8
| | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* lavc: use designated initialisers for all codecs.Anton Khirnov2011-07-291-8/+7
| | | | It's more readable and less prone to breakage.
* Remove statements immediately following unconditional jumpsMans Rullgard2011-07-031-3/+0
| | | | | | This removes a number of compiler warnings. Signed-off-by: Mans Rullgard <mans@mansr.com>
* shorten: Remove stray DEBUG #define and corresponding av_dlog statement.Diego Biurrun2011-06-071-2/+0
|
* Remove unused variablesMans Rullgard2011-06-021-2/+1
|
OpenPOWER on IntegriCloud