summaryrefslogtreecommitdiffstats
path: root/libavcodec/flac_parser.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/flac_parser: Fix infinite loopMichael Niedermayer2018-05-051-2/+7
| | | | | | | | Fixes: crbug/827204 Reported-by: Frank Liberato <liberato@google.com> Reviewed-by: Frank Liberato <liberato@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '800d91d348c89fc8ca3fbec7696ab1ec8787acc6'James Almer2017-03-311-1/+1
|\ | | | | | | | | | | | | * commit '800d91d348c89fc8ca3fbec7696ab1ec8787acc6': Drop pointless void* casts Merged-by: James Almer <jamrial@gmail.com>
| * Drop pointless void* castsDiego Biurrun2016-11-131-1/+1
| |
* | avcodec/flac_parser: Update nb_headers_bufferedMichael Niedermayer2016-11-301-0/+2
| | | | | | | | | | | | | | | | | | Fixes infinite loop Fixes: fuzz.flac Found-by: Frank Liberato <liberato@google.com> Reviewed-by: Frank Liberato <liberato@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/flac_parser: Increase FLAC_MAX_SEQUENTIAL_HEADERS by 1Michael Niedermayer2016-06-241-1/+1
| | | | | | | | | | | | Fixes Ticket5343 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/flac_parser: Raise threshold for detecting invalid dataMichael Niedermayer2016-06-221-2/+2
| | | | | | | | | | | | Fixes regression from Ticket5428 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'b18346817d57c96cc47811cf78b26653e96bd304'Michael Niedermayer2015-04-201-0/+9
|\ \ | |/ | | | | | | | | | | * commit 'b18346817d57c96cc47811cf78b26653e96bd304': flac: fix realloc loop with invalid flac files Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flac: fix realloc loop with invalid flac filesThomas Guillem2015-04-201-0/+9
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec/flac_parser: fix handling EOF if no headers are foundMichael Niedermayer2015-01-171-1/+1
| | | | | | | | | | | | | | Fixes assertion failure Fixes Ticket4269 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/flac_parser: print error messages in case of errorsMichael Niedermayer2015-01-171-1/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/flac_parser: Check for av_malloc() failureMichael Niedermayer2015-01-151-0/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/flac_parser: Use sizeof(variable) instead of sizeof(type)Michael Niedermayer2015-01-151-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/flac_parser: use av_freep(), do not leave stale pointers in memoryMichael Niedermayer2014-10-141-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/flac_parser: remove duplicate assignentMichael Niedermayer2014-07-311-1/+0
| | | | | | | | | | Found-by: CSA Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/flac_parser: use av_fifo_alloc_arrayLukasz Marek2014-05-201-1/+1
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc: use av_fifo_freepLukasz Marek2014-05-071-1/+1
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | Use correct msvc type specifiers for ptrdiff_t and size_t.Carl Eugen Hoyos2014-04-241-1/+1
| | | | | | | | | | | | | | The Windows runtime aborts if it finds %t or %z. Fixes ticket #3472. Reviewed-by: Ronald Bultje
* | flac demuxer: improve seekingRainer Hochecker2014-04-141-0/+13
| |
* | avcodec/flac_parser: export sample_rate also when ↵Michael Niedermayer2013-10-071-1/+4
| | | | | | | | | | | | PARSER_FLAG_COMPLETE_FRAMES is set Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | flac_parser: check return value of av_fifo_alloc()Paul B Mahol2013-06-301-0/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | flac_parser.c: fix case when final frame is a false positiveMichael Chinen2013-06-291-14/+40
| | | | | | | | | | | | | | Should fix https://ffmpeg.org/trac/ffmpeg/ticket/2552 Only did minimal testing on a few files and fate. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487'Michael Niedermayer2013-05-051-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487': avcodec: Add av_cold attributes to init functions missing them Conflicts: libavcodec/aacpsy.c libavcodec/atrac3.c libavcodec/dvdsubdec.c libavcodec/ffv1.c libavcodec/ffv1enc.c libavcodec/h261enc.c libavcodec/h264_parser.c libavcodec/h264dsp.c libavcodec/h264pred.c libavcodec/libschroedingerenc.c libavcodec/libxvid_rc.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/proresdsp.c libavcodec/rangecoder.c libavcodec/videodsp.c libavcodec/x86/proresdsp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-041-1/+2
| |
* | Merge commit 'a5f8873620ce502d37d0cc3ef93ada2ea8fb8de7'Michael Niedermayer2013-05-041-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit 'a5f8873620ce502d37d0cc3ef93ada2ea8fb8de7': silly typo fixes Conflicts: doc/protocols.texi libavcodec/aacpsy.c libavformat/utils.c tools/patcheck Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * silly typo fixesDiego Biurrun2013-05-031-1/+1
| |
| * flac: don't check the number of channels before setting the channel layout.Tim Walker2013-02-061-1/+1
| | | | | | | | | | | | This is unnecessary, as ff_flac_set_channel_layout can handle any number of channels. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | flac: don't check the number of channels before setting the channel layoutTim Walker2013-02-071-1/+1
| | | | | | | | This is unnecessary, as ff_flac_set_channel_layout can handle any number of channels.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-12-221-2/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | * qatar/master: flac: only set channel layout if not previously set or on channel count change prepare 9_beta3 release Conflicts: RELEASE Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flac: only set channel layout if not previously set or on channel count changeJustin Ruggles2012-12-221-2/+5
| | | | | | | | Fixes Bug 402
* | Merge commit '50a65e7a540ce6747f81d6dbf6a602ad35be77ff'Michael Niedermayer2012-11-021-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '50a65e7a540ce6747f81d6dbf6a602ad35be77ff': (24 commits) vmdaudio: set channel layout twinvq: validate sample rate code twinvq: set channel layout twinvq: validate that channels is not <= 0 truespeech: set channel layout sipr: set channel layout shorten: validate that the channel count in the header is not <= 0 ra288dec: set channel layout ra144dec: set channel layout qdm2: remove unneeded checks for channel count qdm2: make sure channels is not <= 0 and set channel layout qcelpdec: set channel layout nellymoserdec: set channels to 1 libopencore-amr: set channel layout for amr-nb or if not set by the user libilbc: set channel layout dpcm: use AVCodecContext.channels instead of keeping a private copy imc: set channels to 1 instead of validating it gsmdec: always set channel layout and sample rate at initialization libgsmdec: always set channel layout and sample rate at initialization g726dec: do not validate sample rate ... Conflicts: libavcodec/dpcm.c libavcodec/qdm2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flacdec: allow mid-stream channel layout changeJustin Ruggles2012-11-011-0/+1
| | | | | | | | | | Although the libFLAC decoder cannot handle such a change, it is allowed by the spec and could potentially occur with live streams.
* | flac_parser.c: fix issue with looping output for small files.Michael Chinen2012-10-141-5/+9
| | | | | | | | | | | | | | see trac 1345 https://ffmpeg.org/trac/ffmpeg/ticket/1345 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | flac_parser: fix fifo ptr wrap checkMichael Niedermayer2012-09-221-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 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
| |
* | flac_parser: speedup fifo reallocMichael Niedermayer2012-05-141-2/+2
| | | | | | | | | | | | Fixes Ticket1121 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-291-2/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+1
| | | | | | | | Also remove one pointless zero initialization in rangecoder.c.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-211-4/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (36 commits) adpcmenc: Use correct frame_size for Yamaha ADPCM. avcodec: add ff_samples_to_time_base() convenience function to internal.h adx parser: set duration mlp parser: set duration instead of frame_size gsm parser: set duration mpegaudio parser: set duration instead of frame_size (e)ac3 parser: set duration instead of frame_size flac parser: set duration instead of frame_size avcodec: add duration field to AVCodecParserContext avutil: add av_rescale_q_rnd() to allow different rounding pnmdec: remove useless .pix_fmts libmp3lame: support float and s32 sample formats libmp3lame: renaming, rearrangement, alignment, and comments libmp3lame: use the LAME default bit rate libmp3lame: use avpriv_mpegaudio_decode_header() for output frame parsing libmp3lame: cosmetics: remove some pointless comments libmp3lame: convert some debugging code to av_dlog() libmp3lame: remove outdated comment. libmp3lame: do not set coded_frame->key_frame. libmp3lame: improve error handling in MP3lame_encode_init() ... Conflicts: doc/APIchanges libavcodec/libmp3lame.c libavcodec/pcxenc.c libavcodec/pnmdec.c libavcodec/pnmenc.c libavcodec/sgienc.c libavcodec/utils.c libavformat/hls.c libavutil/avutil.h libswscale/x86/swscale_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flac parser: set duration instead of frame_sizeJustin Ruggles2012-02-201-4/+6
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-031-5/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (44 commits) replacement Indeo 3 decoder gsm demuxer: do not allocate packet twice. flvenc: use first packet delay as global delay. ac3enc: doxygen update. imc: return error codes instead of 0 for error conditions. imc: return meaningful error codes instead of -1 imc: do not set channel layout for stereo imc: validate channel count imc: check for ff_fft_init() failure imc: check output buffer size before decoding imc: use DSPContext.bswap16_buf() to byte-swap packet data rtsp: add allowed_media_types option libgsm: add flush function to reset the decoder state when seeking libgsm: simplify decoding by using a loop gsm: log error message when packet is too small libgsmdec: do not needlessly set *data_size to 0 gsmdec: do not needlessly set *data_size to 0 gsmdec: add flush function to reset the decoder state when seeking libgsmdec: check output buffer size before decoding gsmdec: log error message when output buffer is too small. ... Conflicts: Changelog ffplay.c libavcodec/indeo3.c libavcodec/mjpeg_parser.c libavcodec/vp3.c libavformat/cutils.c libavformat/id3v2.c libavutil/parseutils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use designated initialisers for parsers.Anton Khirnov2011-11-021-5/+5
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-261-1/+1
| | | | | | | | | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-281-1/+1
|/ | | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit d36beb3f6902b1217beda576aa18abf7eb72b03c)
* Use %td instead of %PRIdPTR. The argument has type ptrdiff_t.Justin Ruggles2010-12-301-1/+1
| | | | Originally committed as revision 26166 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use %"PRIdPTR" instead of %d to silence gcc warning about type mismatch.Justin Ruggles2010-12-301-1/+1
| | | | Originally committed as revision 26164 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flac_parser: loop append buffer when the default size is not enough to getMichael Chinen2010-12-301-14/+27
| | | | | | | the desired number of frames. Patch by Michael Chinen [mchinen at gmail] Originally committed as revision 26163 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: vertical alignment after last commitJustin Ruggles2010-12-121-2/+2
| | | | Originally committed as revision 25934 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flac_parser: only buffer the estimated amount of input needed.Michael Chinen2010-12-121-11/+18
| | | | | | Patch by Michael Chinen [mchinen at gmail] Originally committed as revision 25933 to svn://svn.ffmpeg.org/ffmpeg/trunk
OpenPOWER on IntegriCloud