Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-06avcodec/sonic: Use unsigned for predictor_k to avoid undefined behaviorMichael Niedermayer
Fixes: signed integer overflow: -1094995529 * 24 cannot be represented in type 'int' Fixes: 44436/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-4874459459223552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 28008bf95ed9b2ab5945ae6658358ad7c7f1df35) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-04-01avcodec/sonic: Use unsigned temporary in predictor_calc_error()Michael Niedermayer
Fixes: signed integer overflow: -2147471366 - 18638 cannot be represented in type 'int' Fixes: 30157/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5171199746506752 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 075d793ba87635b77f8302d8a454fa681f90d267) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-10avcodec: set AV_CODEC_CAP_CHANNEL_CONF on decoders which set their own channelsHendrik Leppkes
The decoders in this set either have a fixed channel count, or read it from the bitstream, and thus do not require the channel count as external information. Fixes various regressions since 81503ac58a763a36b1f57264013b1e76acb62b68, which requires a valid channel count for decoders which do not set this capability. Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
2020-11-06avcodec/sonic: Don't allocate a temporary buffer for every frameAndreas Rheinhardt
Instead allocate it together with the buffer that it mirrors. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-11-04avcodec/sonic: Don't hardcode sizeof(int) == 4Andreas Rheinhardt
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-11-04avcodec/sonic: Allocate several buffers togetherAndreas Rheinhardt
It simplifies freeing them and reduces the amount of allocations. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-15avcodec/sonic: Check for overreadMichael Niedermayer
Fixes: Timeout (too long -> 1.3 sec) Fixes: 24358/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5107284099989504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-09-25avcodec/sonic: Check channels before deallocatingMichael Niedermayer
Fixes: heap-buffer-overflow Fixes: 25744/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5172961169113088 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-09-17avcodec/sonic: Fix leaks upon allocation errorsAndreas Rheinhardt
The Sonic decoder and encoders allocate several buffers in their init function and return immediately if one of these allocations fails; this will lead to leaks if there was an earlier successfull allocation. Fix this by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-06-14avcodec/sonic: Fix several integer state overflowsMichael Niedermayer
Fixes: signed integer overflow: -234 * -14797801 cannot be represented in type 'int' Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5695924975435776 Fixes: 22275/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5695924975435776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-14avcodec/sonic: Fix several integer overflowsMichael Niedermayer
Fixes: signed integer overflow: 2129689466 + 2129689466 cannot be represented in type 'int' Fixes: 20715/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5155263109922816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31avcodec/sonic: Check e in get_symbol()Michael Niedermayer
Fixes: signed integer overflow: 1721520852 + 1721520852 cannot be represented in type 'int' Fixes: 18346/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5709623893426176 Fixes: 18753/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5663299131932672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-20avcodec/sonic: Fix integer overflow in predictor_calc_error()Michael Niedermayer
Fixes: signed integer overflow: 5 * -1094995529 cannot be represented in type 'int' Fixes: 18346/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5709623893426176 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-31avcodec/rangecoder: factorize termination version codeMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-17sonic: make sure num_taps * channels is not larger than frame_sizeAndreas Cadhalpun
If that is the case, the loop setting predictor_state in sonic_decode_frame causes out of bounds reads of int_samples, which has only frame_size number of elements. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-09-04avcodec/sonic: Check init_get_bits8() for failureMichael Niedermayer
Fixes: CID1322310 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer
* 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>
2015-07-27avcodec: Add a min size parameter to ff_alloc_packet2()Michael Niedermayer
This parameter can be used to inform the allocation code about how much downsizing might occur, and can be used to optimize how to allocate the packet Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-06-10sonic: set avctx->channels in sonic_decode_initAndreas Cadhalpun
Otherwise it can be 0 in sonic_decode_frame, causing SIGFPE crashes. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-05-15avcodec/sonic: More completely check sample_rate_index and channelsMichael Niedermayer
Fixes CID1271783 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-15avcodec/sonic: check memory allocationsMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10sonic: Switch to rangecoderMichael Niedermayer
significantly improves compression rate This also bumps version to 2 and drops support for version 0/1 If someone used version 0/1 despite their experimental status then support for these can and should be added back Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10avcodec/sonic: add larger version and minor_version fields with version >= 2Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10avcodec/sonic: move version to the contextMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10avcodec/sonic: fix memleaksMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10sonic: use M_SQRT2Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04cosmetics: group remaining .name and .long_name.Clément Bœsch
See b2bed9325.
2013-07-04avcodec/sonic: Fix usage of init_get_bits() and use init_get_bits8()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23sonic: use av_freep() as its safer than av_free()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23sonic: cleanup/simplify num_taps checkMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23sonic: replace divide() by ROUNDED_DIV()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23sonic: avoid float sqrt() for integer input & outputMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23sonic: simplify quant clipingMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23sonic: use av_calloc()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-23sonic: replace literal numbers by sizeof()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-22sonic: replace some float by integers to improve platform independanceMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-22sonic: Improve error codesMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-22sonic: simplify shift_down()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-19sonicenc: fix off by 1 errorMichael Niedermayer
Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-19sonicenc: dont put multiple assignments per lineMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-19sonicenc: set supported samples formats arrayMichael Niedermayer
This ensures that only supported formats are input Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-07sonicenc: don't allocate unused avctx->coded_framePaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-03-21sonicdec: update to new buffer APIMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21sonicenc: fix mono decorrelationMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21sonicdec: fix frame sizeMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21sonicdec: check decorrelationMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-13lavc: factorize ff_{thread_,re,}get_buffer error messages.Clément Bœsch
Coccinelle profile used: @@ expression r, ctx, f, loglevel, str, flags; @@ -if ((r = ff_get_buffer(ctx, f, flags)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_get_buffer(ctx, f, flags)) < 0) + return r; @@ expression r, ctx, f, loglevel, str; @@ -if ((r = ff_reget_buffer(ctx, f)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_reget_buffer(ctx, f)) < 0) + return r; @@ expression r, ctx, f, loglevel, str, flags; @@ -if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) + return r; ...along with some manual patches for the remaining ones.
2013-03-12Merge commit '759001c534287a96dc96d1e274665feb7059145d'Michael Niedermayer
* commit '759001c534287a96dc96d1e274665feb7059145d': lavc decoders: work with refcounted frames. Anton Khirnov (1): lavc decoders: work with refcounted frames. Clément Bœsch (47): lavc/ansi: reset file lavc/ansi: re-do refcounted frame changes from Anton fraps: reset file lavc/fraps: switch to refcounted frames gifdec: reset file lavc/gifdec: switch to refcounted frames dsicinav: resolve conflicts smc: resolve conflicts zmbv: resolve conflicts rpza: resolve conflicts vble: resolve conflicts xxan: resolve conflicts targa: resolve conflicts vmnc: resolve conflicts utvideodec: resolve conflicts tscc: resolve conflicts ulti: resolve conflicts ffv1dec: resolve conflicts dnxhddec: resolve conflicts v210dec: resolve conflicts vp3: resolve conflicts vcr1: resolve conflicts v210x: resolve conflicts wavpack: resolve conflicts pngdec: fix compilation roqvideodec: resolve conflicts pictordec: resolve conflicts mdec: resolve conflicts tiertexseqv: resolve conflicts smacker: resolve conflicts vb: resolve conflicts vqavideo: resolve conflicts xl: resolve conflicts tmv: resolve conflicts vmdav: resolve conflicts truemotion1: resolve conflicts truemotion2: resolve conflicts lcldec: fix compilation libcelt_dec: fix compilation qdrw: fix compilation r210dec: fix compilation rl2: fix compilation wnv1: fix compilation yop: fix compilation tiff: resolve conflicts interplayvideo: fix compilation qpeg: resolve conflicts (FIXME/TESTME). Hendrik Leppkes (33): 012v: convert to refcounted frames 8bps: fix compilation 8svx: resolve conflicts 4xm: resolve conflicts aasc: resolve conflicts bfi: fix compilation aura: fix compilation alsdec: resolve conflicts avrndec: convert to refcounted frames avuidec: convert to refcounted frames bintext: convert to refcounted frames cavsdec: resolve conflicts brender_pix: convert to refcounted frames cinepak: resolve conflicts cinepak: avoid using AVFrame struct directly in private context cljr: fix compilation cpia: convert to refcounted frames cscd: resolve conflicts iff: resolve conflicts and do proper conversion to refcounted frames 4xm: fix reference frame handling cyuv: fix compilation dxa: fix compilation eacmv: fix compilation eamad: fix compilation eatgv: fix compilation escape124: remove unused variable. escape130: convert to refcounted frames evrcdec: convert to refcounted frames exr: convert to refcounted frames mvcdec: convert to refcounted frames paf: properly free the frame data on decode close sgirle: convert to refcounted frames lavfi/moviesrc: use refcounted frames Michael Niedermayer (56): Merge commit '759001c534287a96dc96d1e274665feb7059145d' resolve conflicts in headers motion_est: resolve conflict mpeg4videodec: fix conflicts dpcm conflict fix dpx: fix conflicts indeo3: resolve confilcts kmvc: resolve conflicts kmvc: resolve conflicts h264: resolve conflicts utils: resolve conflicts rawdec: resolve conflcits mpegvideo: resolve conflicts svq1enc: resolve conflicts mpegvideo: dont clear data, fix assertion failure on fate vsynth1 with threads pthreads: resolve conflicts frame_thread_encoder: simple compilefix not yet tested snow: update to buffer refs crytsalhd: fix compile dirac: switch to new API sonic: update to new API svq1: resolve conflict, update to new API ffwavesynth: update to new buffer API g729: update to new API indeo5: fix compile j2kdec: update to new buffer API linopencore-amr: fix compile libvorbisdec: update to new API loco: fix compile paf: update to new API proresdec: update to new API vp56: update to new api / resolve conflicts xface: convert to refcounted frames xan: fix compile&fate v408: update to ref counted buffers v308: update to ref counted buffers yuv4dec: update to ref counted buffers y41p: update to ref counted frames xbm: update to refcounted frames targa_y216: update to refcounted buffers qpeg: fix fate/crash cdxl: fix fate tscc: fix reget buffer useage targa_y216dec: fix style msmpeg4: fix fate h264: ref_picture() copy fields that have been lost too update_frame_pool: use channel field h264: Put code that prevents deadlocks back mpegvideo: dont allow last == current wmalossless: fix buffer ref messup ff_alloc_picture: free tables in case of dimension mismatches h264: fix null pointer dereference and assertion failure frame_thread_encoder: update to bufrefs ec: fix used arrays snowdec: fix off by 1 error in dimensions check h264: disallow single unpaired fields as references of frames Paul B Mahol (2): lavc/vima: convert to refcounted frames sanm: convert to refcounted frames Conflicts: libavcodec/4xm.c libavcodec/8bps.c libavcodec/8svx.c libavcodec/aasc.c libavcodec/alsdec.c libavcodec/anm.c libavcodec/ansi.c libavcodec/avs.c libavcodec/bethsoftvideo.c libavcodec/bfi.c libavcodec/c93.c libavcodec/cavsdec.c libavcodec/cdgraphics.c libavcodec/cinepak.c libavcodec/cljr.c libavcodec/cscd.c libavcodec/dnxhddec.c libavcodec/dpcm.c libavcodec/dpx.c libavcodec/dsicinav.c libavcodec/dvdec.c libavcodec/dxa.c libavcodec/eacmv.c libavcodec/eamad.c libavcodec/eatgq.c libavcodec/eatgv.c libavcodec/eatqi.c libavcodec/error_resilience.c libavcodec/escape124.c libavcodec/ffv1.h libavcodec/ffv1dec.c libavcodec/flicvideo.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/g723_1.c libavcodec/gifdec.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_direct.c libavcodec/h264_loopfilter.c libavcodec/h264_refs.c libavcodec/huffyuvdec.c libavcodec/idcinvideo.c libavcodec/iff.c libavcodec/indeo2.c libavcodec/indeo3.c libavcodec/internal.h libavcodec/interplayvideo.c libavcodec/ivi_common.c libavcodec/jvdec.c libavcodec/kgv1dec.c libavcodec/kmvc.c libavcodec/lagarith.c libavcodec/libopenjpegdec.c libavcodec/mdec.c libavcodec/mimic.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mmvideo.c libavcodec/motion_est.c libavcodec/motionpixels.c libavcodec/mpc7.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/msrle.c libavcodec/msvideo1.c libavcodec/nuv.c libavcodec/options_table.h libavcodec/pcx.c libavcodec/pictordec.c libavcodec/pngdec.c libavcodec/pnmdec.c libavcodec/pthread.c libavcodec/qpeg.c libavcodec/qtrle.c libavcodec/r210dec.c libavcodec/rawdec.c libavcodec/roqvideodec.c libavcodec/rpza.c libavcodec/smacker.c libavcodec/smc.c libavcodec/svq1dec.c libavcodec/svq1enc.c libavcodec/targa.c libavcodec/tiertexseqv.c libavcodec/tiff.c libavcodec/tmv.c libavcodec/truemotion1.c libavcodec/truemotion2.c libavcodec/tscc.c libavcodec/ulti.c libavcodec/utils.c libavcodec/utvideodec.c libavcodec/v210dec.c libavcodec/v210x.c libavcodec/vb.c libavcodec/vble.c libavcodec/vcr1.c libavcodec/vmdav.c libavcodec/vmnc.c libavcodec/vp3.c libavcodec/vp56.c libavcodec/vp56.h libavcodec/vp6.c libavcodec/vqavideo.c libavcodec/wavpack.c libavcodec/xl.c libavcodec/xxan.c libavcodec/zmbv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-07normalize calls to ff_alloc_packet2James Zern
- check ret < 0 - remove excessive error log Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05Merge commit '594d4d5df3c70404168701dd5c90b7e6e5587793'Michael Niedermayer
* 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>