summaryrefslogtreecommitdiffstats
path: root/libavcodec/alsdec.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc/alsdec: use get_bitsz() to simplify reading of the mantissaThilo Borgmann2016-09-091-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/alsdec: Fix reading 0 mantisse bitsMichael Niedermayer2016-09-081-1/+1
| | | | | | | | Fixes assertion failure Fixes: 848c24abc1721c9e3d1ba7bfee8d9fcc/asan_heap-oob_1d99eca_3709_567bba70d67e7d62714dcf56f26fb1da.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/alsdec: Fix raw_mantissa memleakMichael Niedermayer2016-09-081-2/+8
| | | | | | | Fixes: 0cee183a09bff5aa5108429717c35a4d/asan_heap-oob_1d99eca_3702_9ef60e80de79082a778d3d9ce8ef3b64.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/alsdec: Fix mlz memleakMichael Niedermayer2016-09-081-2/+5
| | | | | | | Fixes: 0cee183a09bff5aa5108429717c35a4d/asan_heap-oob_1d99eca_3702_172c75af9868d4c2556a79cc2413f4cc.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/alsdec: Remove unused variableMichael Niedermayer2016-08-221-1/+0
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/alsdec: Implement floating point sample data decodingUmair Khan2016-08-221-2/+282
| | | | | | It conforms to the RM22 version of the reference encoder Signed-off-by: Umair Khan <omerjerk@gmail.com>
* avcodec/alsdec: Check r to prevent out of array readMichael Niedermayer2016-06-071-0/+5
| | | | | | No testcase known Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/alsdec: Fix bitstream readingUmair Khan2016-04-271-3/+4
| | | | | | Signed-off-by: Umair Khan <omerjerk@gmail.com> Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/alsdec: fix max bits in ltp prefix codeUmair Khan2016-03-121-1/+1
| | | | | | | | | | | The maximum number of bits int the prefix code for p(0) is 4. By setting it as 3, we were missing the last 0 bit. This fixes bug #4715 present on the trac. Signed-off-by: Umair Khan <omerjerk@gmail.com> Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Use correct msvc type specifiers for ptrdiff_t and size_t.Carl Eugen Hoyos2016-03-091-2/+2
|
* avcodec/alsdec: treat quant_cof as a signed valueUmair Khan2016-03-061-1/+1
| | | | | | Signed-off-by: Umair Khan <omerjerk@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-271-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-271-1/+1
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * alsdec: only adapt order for positive max_orderAndreas Cadhalpun2015-05-051-1/+1
| | | | | | | | | | | | | | | | For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1) CC: libav-stable@libav.org Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * alsdec: check sample pointer range in revert_channel_correlationAndreas Cadhalpun2015-05-051-3/+23
| | | | | | | | | | | | | | | | | | Also change the type of begin, end and smp to ptrdiff_t to make the comparison well-defined. CC: libav-stable@libav.org Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * alsdec: limit avctx->bits_per_raw_sample to 32Andreas Cadhalpun2015-05-051-0/+6
| | | | | | | | | | | | | | | | | | avctx->bits_per_raw_sample is used in get_sbits_long, which only supports up to 32 bits. CC: libav-stable@libav.org Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avcodec/alsdec: Check for overreadMichael Niedermayer2015-06-041-0/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | alsdec: only adapt order for positive max_orderAndreas Cadhalpun2015-04-231-1/+1
| | | | | | | | | | | | | | For max_order = 0 the clipping range is invalid. (amin = 2, amax = 1) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | alsdec: check sample pointer range in revert_channel_correlationAndreas Cadhalpun2015-04-221-7/+27
| | | | | | | | | | | | | | | | | | Also change the type of begin, end and smp to ptrdiff_t to make the comparison well-defined. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'Michael Niedermayer2015-04-201-18/+18
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25': lavc: Replace av_dlog and tprintf with internal macros Conflicts: libavcodec/aacdec.c libavcodec/audio_frame_queue.c libavcodec/bitstream.c libavcodec/dcadec.c libavcodec/dnxhddec.c libavcodec/dvbsubdec.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/get_bits.h libavcodec/gifdec.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_refs.c libavcodec/imc.c libavcodec/interplayvideo.c libavcodec/jpeglsdec.c libavcodec/libopencore-amr.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_parser.c libavcodec/pngdec.c libavcodec/ratecontrol.c libavcodec/rv10.c libavcodec/svq1dec.c libavcodec/vqavideo.c libavcodec/wmadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-191-18/+18
| |
* | alsdec: validate time diff indexAndreas Cadhalpun2015-04-191-0/+8
| | | | | | | | | | | | | | | | | | | | If begin is smaller than t, the subtraction 'begin -= t' wraps around, because begin is unsigned. The same applies for end < t. This causes segmentation faults. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | alsdec: limit avctx->bits_per_raw_sample to 32Andreas Cadhalpun2015-04-181-0/+6
| | | | | | | | | | | | | | | | avctx->bits_per_raw_sample is used in get_sbits_long, which only supports up to 32 bits. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/alsdec: Use av_mallocz_array() for chan_data to ensure the arrays ↵Michael Niedermayer2015-04-181-2/+2
| | | | | | | | | | | | never contain random data Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | alsdec: ensure channel reordering is reversibleAndreas Cadhalpun2015-04-181-1/+5
| | | | | | | | | | | | | | | | | | | | If the same idx is used for more than one i, at least one entry in sconf->chan_pos remains uninitialized. This can cause segmentation faults. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/alsdec: use av_malloc(z)_array()Paul B Mahol2015-04-141-31/+30
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '7f9f771eac0d37a632e0ed9bd89961d57fcfb7e0'Michael Niedermayer2015-02-141-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7f9f771eac0d37a632e0ed9bd89961d57fcfb7e0': avcodec: Don't anonymously typedef structs Conflicts: libavcodec/alac.c libavcodec/cinepak.c libavcodec/cscd.c libavcodec/dcadec.c libavcodec/g723_1.c libavcodec/gif.c libavcodec/iff.c libavcodec/kgv1dec.c libavcodec/libopenjpegenc.c libavcodec/libspeexenc.c libavcodec/ra288.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Don't anonymously typedef structsDiego Biurrun2015-02-141-4/+4
| |
* | avcodec/alsdec: use init_get_bits8()Paul B Mahol2015-02-051-1/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit 'c67b449bebbe0b35c73b203683e77a0a649bc765'Michael Niedermayer2014-06-231-6/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c67b449bebbe0b35c73b203683e77a0a649bc765': dsputil: Split bswap*_buf() off into a separate context Conflicts: configure libavcodec/4xm.c libavcodec/ac3dec.c libavcodec/ac3dec.h libavcodec/apedec.c libavcodec/eamad.c libavcodec/flacenc.c libavcodec/fraps.c libavcodec/huffyuv.c libavcodec/huffyuvdec.c libavcodec/motionpixels.c libavcodec/truemotion2.c libavcodec/x86/Makefile libavcodec/x86/dsputil_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Split bswap*_buf() off into a separate contextDiego Biurrun2014-06-221-6/+6
| |
* | avcodec/alsdec: Clear MPEG4AudioConfig so that no use of uninitialized ↵Michael Niedermayer2014-06-081-1/+1
| | | | | | | | | | | | memory is possible Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'cc8163e1a3601a56f722a4720516e860bf1c6198'Michael Niedermayer2014-03-221-2/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cc8163e1a3601a56f722a4720516e860bf1c6198': avcodec: more correct printf specifiers Conflicts: libavcodec/4xm.c libavcodec/alsdec.c libavcodec/dfa.c libavcodec/h264_ps.c libavcodec/jpeg2000dec.c libavcodec/lagarith.c libavcodec/mpeg12dec.c libavcodec/rv10.c libavcodec/svq3.c libavcodec/wmaprodec.c libavcodec/xwddec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: more correct printf specifiersDiego Biurrun2014-03-221-2/+7
| |
* | avcodec/alsdec: check predictor order against block lengthMichael Niedermayer2014-02-161-1/+5
| | | | | | | | | | | | | | Fixes out of array access Fixes: abd3c041acbcb816be113455d138166b-asan_heap-oob_b11634_3707_cov_1707137151_als_05_2ch48k16b.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/alsdec: skip cases where the master channel equals the current channelMichael Niedermayer2013-12-291-4/+4
| | | | | | | | | | | | | | | | Fixes: msan_uninit-mem_7f6c73c97cf9_3571_als_04_2ch48k16b.mp4 Fixes use of uninitialized memory Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-12-111-0/+5
|\ \ | |/ | | | | | | | | | | | | * qatar/master: alsdec: check block length See: 0ceca269b66ec12a23bf0907bd2c220513cdbf16 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * alsdec: check block lengthReinhard Tartler2013-12-101-0/+5
| | | | | | | | | | | | | | Fix writing over the end Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Addresses: CVE-2013-0845
* | Merge commit '23a211cbba0b7c9ee694040031b2e5da1be54a00'Michael Niedermayer2013-10-281-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '23a211cbba0b7c9ee694040031b2e5da1be54a00': lavc: change all decoders to behave consistently with AV_EF_CRCCHECK. Conflicts: libavcodec/avcodec.h libavcodec/tta.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: change all decoders to behave consistently with AV_EF_CRCCHECK.Anton Khirnov2013-10-281-0/+2
| | | | | | | | | | | | Just crccheck prints a warning, crccheck+explode returns an error. Also document this behavior.
* | Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'Michael Niedermayer2013-10-041-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2': cosmetics: Group .name and .long_name together in codec/format declarations Conflicts: libavcodec/8svx.c libavcodec/alac.c libavcodec/cljr.c libavcodec/dnxhddec.c libavcodec/dnxhdenc.c libavcodec/dpxenc.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/ffv1dec.c libavcodec/flacdec.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/g726.c libavcodec/gif.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/h263dec.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopencore-amr.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libspeexenc.c libavcodec/libvo-amrwbenc.c libavcodec/libvorbisenc.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/ljpegenc.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpeg4videodec.c libavcodec/msmpeg4dec.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/proresdec_lgpl.c libavcodec/proresenc_kostya.c libavcodec/ra144enc.c libavcodec/rawdec.c libavcodec/rv10.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tta.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/wavpack.c libavcodec/xbmenc.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-031-1/+1
| |
* | Update my email address.Thilo Borgmann2013-08-131-2/+2
| |
* | alsdec: minor simplification in read_block()Michael Niedermayer2013-07-241-2/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ca488ad480360dfafcb5766f7bfbb567a0638979'Michael Niedermayer2013-07-241-64/+75
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'ca488ad480360dfafcb5766f7bfbb567a0638979': alsdec: Clean up error paths Conflicts: libavcodec/alsdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * alsdec: Clean up error pathsLuca Barbato2013-07-231-63/+75
| | | | | | | | | | | | Fix at least a memory leak. CC: libav-stable@libav.org
* | Merge commit '70ecc175c7b513a153ac87d1c5d219556ca55070'Michael Niedermayer2013-07-241-6/+12
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit '70ecc175c7b513a153ac87d1c5d219556ca55070': alsdec: Fix the clipping range Conflicts: libavcodec/alsdec.c See: feaff427c0df015146f660199453bd8c0314e677 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * alsdec: Fix the clipping rangeLuca Barbato2013-07-231-6/+12
| | | | | | | | | | | | | | mcc_weightings is only 32 elements. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | Merge commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110'Michael Niedermayer2013-05-161-4/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110': vf_aspect: use the name 's' for the pointer to the private context Remove commented-out debug #define cruft Conflicts: libavcodec/4xm.c libavcodec/dvdsubdec.c libavcodec/ituh263dec.c libavcodec/mpeg12.c libavfilter/avfilter.c libavfilter/vf_aspect.c libavfilter/vf_fieldorder.c libavformat/rtmpproto.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove commented-out debug #define cruftDiego Biurrun2013-05-161-4/+0
| |
OpenPOWER on IntegriCloud