summaryrefslogtreecommitdiffstats
path: root/libavcodec/alsdec.c
Commit message (Collapse)AuthorAgeFilesLines
* alsdec/read_specific_config: check for init_get_bits failureMichael Niedermayer2013-01-281-1/+3
| | | | | | | | This also fixes a potential integer overflow Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* alsdec: Introduce failsafe switch to keep ALSSpecificConfig consistent to ↵Thilo Borgmann2013-01-061-4/+5
| | | | | | | the input. Reveiwed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* alsdec: Consistently use a period at the end of error messages.Thilo Borgmann2013-01-061-14/+14
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* alsdec: change channel sorting so it match reference implementationPaul B Mahol2013-01-051-2/+5
| | | | | | Read channel source instead of channel target for channel sorting. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Fix "knwon" typo and add a check in tools/patcheckPaul B Mahol2013-01-041-1/+1
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* alsdec: improve warning message when invalid channel position is foundPaul B Mahol2012-12-231-1/+1
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* alsdec: cosmetics after previous commitPaul B Mahol2012-12-211-8/+8
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* alsdec: channel sortingPaul B Mahol2012-12-211-3/+13
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* alsdec: propagate error codes in read_block()Michael Niedermayer2012-12-131-4/+5
| | | | | Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* alsdec: make return checking for read_*_block_data() consistentMichael Niedermayer2012-12-131-1/+1
| | | | | Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* alsdec: Use AVERROR_INVALIDDATA in read_const_block_dataMichael Niedermayer2012-12-131-1/+1
| | | | | Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* alsdec: check block lengthMichael Niedermayer2012-12-121-2/+8
| | | | | | | Fix writing over the end Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '594d4d5df3c70404168701dd5c90b7e6e5587793'Michael Niedermayer2012-12-051-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '594d4d5df3c70404168701dd5c90b7e6e5587793': lavc: add a wrapper for AVCodecContext.get_buffer(). Conflicts: libavcodec/4xm.c libavcodec/8svx.c libavcodec/bmv.c libavcodec/cljr.c libavcodec/cscd.c libavcodec/dnxhddec.c libavcodec/dpcm.c libavcodec/dpx.c libavcodec/eacmv.c libavcodec/eamad.c libavcodec/frwu.c libavcodec/g723_1.c libavcodec/gifdec.c libavcodec/idcinvideo.c libavcodec/iff.c libavcodec/indeo3.c libavcodec/internal.h libavcodec/interplayvideo.c libavcodec/kmvc.c libavcodec/mpc7.c libavcodec/mpegaudiodec.c libavcodec/pcx.c libavcodec/pngdec.c libavcodec/pnmdec.c libavcodec/rl2.c libavcodec/snow.c libavcodec/targa.c libavcodec/tscc.c libavcodec/txd.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vb.c libavcodec/vmdav.c libavcodec/vp56.c libavcodec/vqavideo.c libavcodec/wavpack.c libavcodec/wnv1.c libavcodec/xl.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | alsdec: fix clipping of weightings for MCC decodingThilo Borgmann2012-10-141-6/+6
| | | | | | | | | | Fixes CID717905 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '0a7005bebd23ade7bb852bce0401af1a8fdbb723'Michael Niedermayer2012-10-131-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '0a7005bebd23ade7bb852bce0401af1a8fdbb723': rtpdec_xiph: fix function return type smjpeg: fix type of 'ret' variable in smjpeg_read_packet() mpegvideo: remove write-only variable Use proper return values in case of missing features fate: add avstring test rangecoder-test: Set error message log level to error, instead of debug Conflicts: libavcodec/aacdec.c libavcodec/amrnbdec.c libavcodec/mpegvideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Use proper return values in case of missing featuresDiego Biurrun2012-10-121-3/+3
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-181-14/+17
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: flvenc: silence bogus warning configure: include flags in nm variable alsdec: fix misplaced parentheses. alsdec: check return values. alsdec: fix number of decoded samples in first sub-block in BGMC mode. alsdec: Fix out of ltp_gain_values read. alsdec: Check that quantized parcor coeffs are within range. alsdec: check opt_order. Conflicts: configure libavcodec/alsdec.c libavformat/flvenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * alsdec: fix misplaced parentheses.Clément Bœsch2012-09-171-1/+1
| | | | | | | | Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
| * alsdec: check return values.Thilo Borgmann2012-09-171-5/+7
| | | | | | | | Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
| * alsdec: fix number of decoded samples in first sub-block in BGMC mode.Thilo Borgmann2012-09-171-6/+6
| | | | | | | | | | | | | | | | Fixes CVE-2012-2790 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
| * alsdec: Fix out of ltp_gain_values read.Thilo Borgmann2012-09-171-1/+1
| | | | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
| * alsdec: Check that quantized parcor coeffs are within range.Michael Niedermayer2012-09-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | ALS spec: 11.6.3.1.1 Quantization and encoding of parcor coefficients ... In all cases the resulting quantized values ak are restricted to the range [-64,63]. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
| * alsdec: check opt_order.Michael Niedermayer2012-09-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | Fixes out of array write in quant_cof. Also make sure no invalid opt_order stays in the context. Fixes CVE-2012-2775 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* | Merge commit '23aae62c2cb4504a09ceb8cd0cabc1c8b260f521'Michael Niedermayer2012-09-181-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '23aae62c2cb4504a09ceb8cd0cabc1c8b260f521': alsdec: Check k used for rice decoder. avfiltergraph: silence an uninitialized variable warning xsubenc: reindent lavc: replace AVCodecContext.encode with subtitle-specific callback lavc: add const to private codec class initialization. avconv: don't pass a bogus parameter to avfilter_graph_create_filter(). id3v2: strdup the genre name explicitly. lavf/id3v2: do not export empty fields. buffersrc: add const to the AVFrame* argument of av_buffersrc_write_frame() lavfi: replace empty input/output lists with null pointers Conflicts: ffmpeg_filter.c libavcodec/alsdec.c libavcodec/dvdsubenc.c libavcodec/utils.c libavcodec/v210dec.h libavfilter/af_channelsplit.c libavfilter/avfiltergraph.c libavfilter/buffersrc.c libavfilter/src_movie.c libavfilter/vf_ass.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * alsdec: Check k used for rice decoder.Michael Niedermayer2012-09-171-0/+5
| | | | | | | | | | | | | | Values that fail this check will cause failure of decode_rice() Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-1/+1
| |
* | Revert "alsdec: remove dead assignments"Michael Niedermayer2012-07-021-2/+2
| | | | | | | | | | | | This reverts commit 4ca6d206d1b5beea42c4290d2ee801aaf5cd31f0. The assignment is not dead, this should fix fate failures on BSD
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-021-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: asfdec: read attached pictures. apetag: reindent apetag: export attached covers as video streams. apetag: fix the amount of data read from binary tags. apetag: make sure avio_get_str() doesn't read more than it should. mov: read itunes cover art. snow: remove VLA in mc_block() intfloat: Don't use designated initializers in the public headers snow: remove a VLA. doc: Remind devs to check return values, especially for malloc() et al MS ATC Screen (aka MSS3) decoder vf_yadif: move x86 init code to x86/yadif.c vf_gradfun: move x86 init code to x86/gradfun.c roqvideo: Remove a totally unused dspcontext smacker: remove some unused code dsicin: remove dead assignment aacdec: remove dead assignment rl2: remove dead assignment proresenc: make a variable local to the loop where it is used alsdec: remove dead assignments Conflicts: Changelog doc/developer.texi libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/version.h libavfilter/gradfun.h libavfilter/x86/gradfun.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * alsdec: remove dead assignmentsMans Rullgard2012-07-011-2/+2
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | alsdec.c: Also test 0 when checking rice decoder values.Carl Eugen Hoyos2012-05-051-1/+1
| | | | | | | | Suggested-by: Thilo Borgmann
* | alsdec.c: Simplify error check before calling rice decoder.Carl Eugen Hoyos2012-05-051-1/+1
| | | | | | | | Reviewed-by: Thilo Borgmann
* | alsdec: fix number of decoded samples in first sub-block in BGMC mode.Thilo Borgmann2012-04-151-2/+2
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-071-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtpdec_asf: Set the no_resync_search option for the chained asf demuxer asfdec: Add an option for not searching for the packet markers cosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others cosmetics: Align codec declarations cosmetics: Convert mimic.c to utf-8 avconv: remove an unused function parameter. avconv: remove now pointless variables. avconv: drop support for building without libavfilter. nellymoserenc: fix crash due to memsetting the wrong area. libavformat: Only require first packet to be known for audio/video streams avplay: Don't try to scale timestamps if the tb isn't set Conflicts: Changelog configure ffmpeg.c libavcodec/aacenc.c libavcodec/bmpenc.c libavcodec/dnxhddec.c libavcodec/dnxhdenc.c libavcodec/ffv1.c libavcodec/flacenc.c libavcodec/fraps.c libavcodec/huffyuv.c libavcodec/libopenjpegdec.c libavcodec/mpeg12enc.c libavcodec/mpeg4videodec.c libavcodec/pamenc.c libavcodec/pgssubdec.c libavcodec/pngenc.c libavcodec/qtrleenc.c libavcodec/rawdec.c libavcodec/sgienc.c libavcodec/tiffenc.c libavcodec/v210dec.c libavcodec/wmv2dec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Align codec declarationsMartin Storsjö2012-04-061-3/+3
| | | | | | | | | | | | | | 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>
* | alsdec: Check k used for rice decoder.Michael Niedermayer2012-04-071-0/+5
| | | | | | | | | | | | Values that fail this check will cause failure of decode_rice() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-291-8/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: asf: only set index_read if the index contained entries. cabac: add overread protection to BRANCHLESS_GET_CABAC(). cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC(). cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE(). cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC(). h264: add overread protection to get_cabac_bypass_sign_x86(). h264: reindent get_cabac_bypass_sign_x86(). h264: use struct offsets in get_cabac_bypass_sign_x86(). h264: fix overreads in cabac reader. wmall: fix seeking. lagarith: fix buffer overreads. dvdec: drop unnecessary dv_tablegen.h #include build: fix doc generation errors in parallel builds Replace memset(0) by zero initializations. faandct: Remove FAAN_POSTSCALE define and related code. dvenc: print allowed profiles if the video doesn't conform to any of them. avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size. FATE: add a test for vp8 with changing frame size. fate: add kgv1 fate test. oggdec: calculate correct timestamps in Ogg/FLAC Conflicts: libavcodec/4xm.c libavcodec/cook.c libavcodec/dvdata.c libavcodec/dvdsubdec.c libavcodec/lagarith.c libavcodec/lagarithrac.c libavcodec/utils.c tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace memset(0) by zero initializations.Diego Biurrun2012-03-281-8/+3
| | | | | | | | Also remove one pointless zero initialization in rangecoder.c.
* | alsdec: check return values.Thilo Borgmann2012-03-271-3/+3
| |
* | alsdec: make sure no invalid opt_order stays in the context.Michael Niedermayer2012-03-271-0/+1
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | als: consistent messagesThilo Borgmann2012-03-261-11/+11
| | | | | | | | | | | | "." for warnings, "!" for errors. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ALS error message pretty printThilo Borgmann2012-03-261-1/+1
| | | | | | | | | | | | One prettier message. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | alsdec: check opt_order.Michael Niedermayer2012-03-241-0/+4
| | | | | | | | | | | | | | Fixes out of array write in quant_cof Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | alsdec: Fix out of ltp_gain_values read.Thilo Borgmann2012-03-111-1/+1
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | alsdec: pretty print for another log messageThilo Borgmann2012-03-111-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-061-1/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (31 commits) cdxl demux: do not create packets with uninitialized data at EOF. Replace computations of remaining bits with calls to get_bits_left(). amrnb/amrwb: Remove get_bits usage. cosmetics: reindent avformat: do not require a pixel/sample format if there is no decoder avformat: do not fill-in audio packet duration in compute_pkt_fields() lavf: Use av_get_audio_frame_duration() in get_audio_frame_size() dca_parser: parse the sample rate and frame durations libspeexdec: do not set AVCodecContext.frame_size libopencore-amr: do not set AVCodecContext.frame_size alsdec: do not set AVCodecContext.frame_size siff: do not set AVCodecContext.frame_size amr demuxer: do not set AVCodecContext.frame_size. aiffdec: do not set AVCodecContext.frame_size mov: do not set AVCodecContext.frame_size ape: do not set AVCodecContext.frame_size. rdt: remove workaround for infinite loop with aac avformat: do not require frame_size in avformat_find_stream_info() for CELT avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3 avformat: do not require frame_size in avformat_find_stream_info() for AAC ... Conflicts: doc/APIchanges libavcodec/Makefile libavcodec/avcodec.h libavcodec/h264.c libavcodec/h264_ps.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/dsputil_mmx.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * alsdec: do not set AVCodecContext.frame_sizeJustin Ruggles2012-03-051-1/+0
| | | | | | | | It is not necessary
| * als: prevent infinite loop in zero_remaining().Ronald S. Bultje2012-02-171-1/+1
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | alsdec: Check that quantized parcor coeffs are within range.Michael Niedermayer2012-02-291-0/+4
| | | | | | | | | | | | | | | | | | | | ALS spec: 11.6.3.1.1 Quantization and encoding of parcor coefficients ... In all cases the resulting quantized values ak are restricted to the range [-64,63]. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud