summaryrefslogtreecommitdiff
path: root/libavcodec/wavpack.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/wavpack: Check shiftMichael Niedermayer2017-03-211-0/+6
| | | | | | | | Fixes: runtime error: shift exponent 255 is too large for 32-bit type 'unsigned int' Fixes: 894/clusterfuzz-testcase-4841537823309824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpack: Fix multiple integer overflowsMichael Niedermayer2017-03-161-6/+6
| | | | | | | Fixes: 839/clusterfuzz-testcase-4871084446842880 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpack: Fix runtime error: shift exponent 32 is too large for ↵Michael Niedermayer2017-03-141-1/+1
| | | | | | | | | 32-bit type 'int' Fixes: 822/clusterfuzz-testcase-4873433189974016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpack: Fix runtime error: left shift of negative value -5Michael Niedermayer2017-03-081-1/+1
| | | | | | | Fixes: 729/clusterfuzz-testcase-5154831595470848 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpack: Fix runtime error: left shift of negative value -2Michael Niedermayer2017-03-051-2/+2
| | | | | | | Fixes: 723/clusterfuzz-testcase-6471394663596032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpack: Check bitrate_acc for overflowMichael Niedermayer2017-03-051-3/+9
| | | | | | | Fixes: undefined behavior in 717/clusterfuzz-testcase-5434924129583104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpack: Fix 280:22: runtime error: left shift of negative value -1Michael Niedermayer2017-02-251-1/+1
| | | | | | Fixes: 653/clusterfuzz-testcase-5773837415219200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpack: Check post_shiftMichael Niedermayer2017-02-251-0/+3
| | | | | | | | Fixes: runtime error: shift exponent 34 is too large for 32-bit type 'int' Fixes: 653/clusterfuzz-testcase-5773837415219200 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpacl: Fix runtime error: left shift of negative value -1Michael Niedermayer2017-02-191-1/+1
| | | | | | | Fixes: 607/clusterfuzz-testcase-5108792465293312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpack: Treat the first block coding too many channels as an errorMichael Niedermayer2016-12-071-1/+1
| | | | | | | | Fixes memleak Fixes: 236/8aeebc9ca49b91bf71c114dcefac56c154a3a563 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'b668662939de3a02454cfc9ba3e6d10b87527a40'Clément Bœsch2016-06-291-3/+3
|\ | | | | | | | | | | | | | | | | | | * commit 'b668662939de3a02454cfc9ba3e6d10b87527a40': get_bits: Move BITSTREAM_READER_LE definition before all relevant #includes The merge commit also includes changes for libavcodec/interplayacm.c and libavcodec/truemotion2rt.c Merged-by: Clément Bœsch <clement@stupeflix.com>
| * get_bits: Move BITSTREAM_READER_LE definition before all relevant #includesDiego Biurrun2016-06-071-3/+3
| | | | | | | | | | | | | | This avoids the danger that get_bits.h might get indirectly #included before BITSTREAM_READER_LE is defined. Also sort headers into canonical order where appropriate.
| * lavc: Use get_bitsz where neededAndreas Cadhalpun2016-01-111-1/+1
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | lavc: use get_bitsz to simplify the codeAndreas Cadhalpun2016-01-031-1/+1
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avcodec: use HAVE_THREADS header guards to silence -Wunused-functionGanesh Ajjanagadde2015-10-041-0/+2
| | | | | | | | | | | | | | | | | | | | When compiled with --disable-pthreads, e.g http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7, a bunch of -Wunused-functions are reported due to missing header guards around threading related functions. This patch should silence such warnings. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-271-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-1/+1
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | 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>
* | wavpack: limit extra_bits to 32 and use get_bits_longAndreas Cadhalpun2015-07-021-2/+6
| | | | | | | | | | | | | | | | More than 32 bits can't be stored in an integer and get_bits should not be used with more than 25 bits. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | wavpack: use get_bits_long to read up to 32 bitsAndreas Cadhalpun2015-06-281-2/+2
| | | | | | | | | | | | | | get_bits should not be used for more than 25 bits. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avcodec/wavpack: Check L/R values before use to avoid harmless integer ↵Michael Niedermayer2015-05-031-0/+8
| | | | | | | | | | | | overflow and undefined behavior in fate Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | wavpack: check number of channelsChristophe Gisquet2014-08-221-1/+4
| | | | | | | | | | This means container and codec disagree. The codec is supposed to know better so this could be an error instead.
* | wavpack: report if there is no bits leftChristophe Gisquet2014-08-191-0/+4
| | | | | | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/wavpack: fix () in macrosMichael Niedermayer2014-06-181-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/wavpack: initialize pointers to silence warning about them possibly ↵Michael Niedermayer2014-05-071-1/+1
| | | | | | | | | | | | being uninitialized Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/wavpack fix *void pointer arithmeticMichael Niedermayer2013-12-231-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/wavpack: clear remainder of data in case of error in ↵Michael Niedermayer2013-12-231-0/+13
| | | | | | | | | | | | | | | | | | wv_unpack_mono/stereo() Fixes use of uninitialized data Fixes: msan_uninit-mem_7fd85b654950_4005_because.wv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/wavpack: use init_get_bits8()Paul B Mahol2013-10-301-2/+4
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '23a211cbba0b7c9ee694040031b2e5da1be54a00'Michael Niedermayer2013-10-281-3/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | * 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-3/+5
| | | | | | | | | | | | 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
| |
* | WavPack encoderPaul B Mahol2013-08-141-159/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavc: copy AVCodecContext for threadsPaul B Mahol2013-06-131-0/+8
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | wavpack: add missing .\n to entropy error messagePaul B Mahol2013-06-081-1/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | wavpack: frame multi-threading supportPaul B Mahol2013-06-051-2/+4
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | wavpack: remove redundant error log messagePaul B Mahol2013-06-031-3/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '89806691b1c39181c63d95e0fddc30f11e2a7b04'Michael Niedermayer2013-05-291-5/+10
|\ \ | |/ | | | | | | | | | | | | * commit '89806691b1c39181c63d95e0fddc30f11e2a7b04': wavpack: check that all the channels were coded. wavpack: check that there aren't too many blocks per packet Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * wavpack: check that all the channels were coded.Anton Khirnov2013-05-281-0/+5
| |
| * wavpack: check that there aren't too many blocks per packetAnton Khirnov2013-05-281-0/+5
| |
* | Merge commit '7d039e70a5ff23a7deaa866684d2e8872acc5169'Michael Niedermayer2013-05-291-17/+18
|\ \ | |/ | | | | | | | | | | * commit '7d039e70a5ff23a7deaa866684d2e8872acc5169': wavpack: extract channel information from the bitstream Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * wavpack: extract channel information from the bitstreamAnton Khirnov2013-05-281-17/+18
| | | | | | | | | | This way we don't require the caller to parse the block header. It also allows the channel configuration to change mid-stream.
* | Merge commit '78f75b6fa421dd39a715588e9487579f1ce5bada'Michael Niedermayer2013-05-291-22/+44
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '78f75b6fa421dd39a715588e9487579f1ce5bada': wavpack: extract sample rate from the bitstream configure: support gcc-4.8 instrumentation Conflicts: libavcodec/wavpack.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * wavpack: extract sample rate from the bitstreamAnton Khirnov2013-05-281-23/+43
| | | | | | | | | | This way we don't require the caller to parse the block header. It also allows the sample rate to change mid-stream.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-05-281-40/+12
|\ \ | |/ | | | | | | | | | | | | | | | | | | * qatar/master: smacker: assign video frame PTS matroskadec: export full wavpack blocks. Conflicts: libavcodec/wavpack.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * matroskadec: export full wavpack blocks.Anton Khirnov2013-05-281-40/+12
| | | | | | | | | | This allows us to get rid of demuxer-specific hacks in the decoder and will allow streamcopy from matroska once we have a wavpack muxer.
* | Merge commit '5074f4545c439420daebe4c2f28ed216440b6ec7'Michael Niedermayer2013-05-281-19/+14
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '5074f4545c439420daebe4c2f28ed216440b6ec7': wavpack demuxer: export full wavpack blocks. Conflicts: libavformat/wv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * wavpack demuxer: export full wavpack blocks.Anton Khirnov2013-05-281-19/+14
| | | | | | | | | | | | | | | | Currently the demuxer shaves the blocks and exports only the information that is useful to the decoder. Exporting the blocks just as they are stored is simpler to understand and will make remuxing wavpack easier.
* | Merge commit '72dee5f40b236c5eb9e68df39df80c68392269e3'Michael Niedermayer2013-05-281-4/+1
|\ \ | |/ | | | | | | | | | | * commit '72dee5f40b236c5eb9e68df39df80c68392269e3': wavpack: don't set sample format in init. Merged-by: Michael Niedermayer <michaelni@gmx.at>