summaryrefslogtreecommitdiff
path: root/libavcodec/parser.c
Commit message (Collapse)AuthorAge
* avcodec, avformat: Remove unnecessary inclusions of lavc/internal.hAndreas Rheinhardt2022-03-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* all: Remove unnecessary libavcodec/internal.h inclusionsAndreas Rheinhardt2022-02-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Allow up to seven codec ids per parserAndreas Rheinhardt2021-09-02
| | | | | | | ff_pnm_parser and ff_vp3_parser already hit the current limit; an addition to the former (to handle pfm) is planned. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Move all AVCodecParser.split functions to remove_extradata_bsfAndreas Rheinhardt2021-04-27
| | | | | | | The remove_extradata bsf is the only user of these functions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Constify AVCodecParserContext.parserAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/parser: Remove deprecated av_parser_changeAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 9a07c1332cfe092b57b5758f22b686ca58806c60. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec, avformat: Remove AVPacket.convergence_durationAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 948f3c19a8bd069768ca411212aaf8c1ed96b10d. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/parser: Don't return pointer to stack bufferAndreas Rheinhardt2021-03-20
| | | | | | | | | | | | | When flushing, the parser receives a dummy buffer with padding that lives on the stack of av_parser_parse2(). Certain parsers (e.g. Dolby E) only analyze the input, but don't repack it. When flushing, such parsers return a pointer to the stack buffer and a size of 0. And this is also what av_parser_parse2() returns. Fix this by always resetting poutbuf in case poutbuf_size is zero. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/parser: Schedule av_parser_change for removalAndreas Rheinhardt2021-03-06
| | | | | | | | Originally deprecated in 748c2fca7e4d99357c234936aa71212a6282be36, publically deprecated in 9a07c1332cfe092b57b5758f22b686ca58806c60 (merged into FFmpeg in 1885ffb03d0af28e6bac2bcc8725fa15b93f6ac9). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/parser: Optimize ff_combine_frame() with massivly negative nextMichael Niedermayer2019-08-23
| | | | | | | | Fixes: Timeout Fixes: 15558/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5705273643106304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/parser: Check next index validity in ff_combine_frame()Michael Niedermayer2019-07-17
| | | | | | | | Fixes: out of array access Fixes: 15522/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DNXHD_fuzzer-5747756078989312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/parser: move parsers list and related API to its own fileJames Almer2018-07-21
| | | | | | | | | And add it to the CONFIGURABLE_COMPONENTS list in Makefile. This way, changes to the new file will be tracked and the usual warning to suggest re-running configure will be shown. Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* sbc: add parser for SBCAurelien Jacobs2018-03-07
|
* lavc: add new API for iterating codecs and codec parsersJosh de Kock2018-02-06
| | | | Based on an unfinished patch by atomnuker.
* avcodec/parser: use a mutex instead of atomics in av_register_codec_parser()James Almer2018-01-04
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/parser: assert that there is a past buffer if theres a reference ↵Michael Niedermayer2017-06-16
| | | | | | into the past Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '53618054b64ce4dab459d23a7efebe9d5afc4855'James Almer2017-05-04
|\ | | | | | | | | | | | | * commit '53618054b64ce4dab459d23a7efebe9d5afc4855': parser: Add missing #include for printing ISO C99 conversion specifiers Merged-by: James Almer <jamrial@gmail.com>
| * parser: Add missing #include for printing ISO C99 conversion specifiersDiego Biurrun2016-12-25
| |
| * Use correct printf conversion specifiers for POSIX integer typesDiego Biurrun2016-12-23
| |
* | Fix all -Wformat warnings raised by DJGPPClément Bœsch2017-03-29
| |
* | lavc/parser: export field order if not already setRodger Combs2016-10-24
| | | | | | | | Some codecs set this in the parser, but not the decoder
* | avcodec/parser: assert that the codec id is not NONE in av_parser_parse2()Michael Niedermayer2016-04-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | parser: add av_assert1 to make sure the codec matchesAndreas Cadhalpun2016-01-05
| | | | | | | | | | | | | | | | Otherwise this can have some surprising effects (crashes), so let's better not allow it. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | Merge commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d'Hendrik Leppkes2015-09-29
|\| | | | | | | | | | | | | * commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d': lavc: Make AVPacket.duration int64, and deprecate convergence_duration Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: Make AVPacket.duration int64, and deprecate convergence_durationwm42015-09-29
| | | | | | | | | | | | | | | | | | Note that convergence_duration had another meaning, one which was in practice never used. The only real use for it was a 64 bit replacement for the duration field. It's better just to make duration 64 bits, and to get rid of it. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | | | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/parser: Print an error in case of reallocation fails in ↵Michael Niedermayer2015-05-31
| | | | | | | | | | | | ff_combine_frame() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/parser: Remove duplicate header inlcudeMichael Niedermayer2015-04-20
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-19
| |
* | Merge commit '31d2039cb42668ebcf08248bc48bbad44aa05f49'Michael Niedermayer2015-02-19
|\| | | | | | | | | | | | | | | | | | | | | * commit '31d2039cb42668ebcf08248bc48bbad44aa05f49': h264_parser: export video format and dimensions Conflicts: libavcodec/h264_parser.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_parser: export video format and dimensionsAnton Khirnov2015-02-19
| |
* | avcodec/parser: optimize ff_mpeg4video_split()Zhaoxiu Zeng2015-02-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/parser: Check that the parser return code is validMichael Niedermayer2015-01-15
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '8a9641a652ed1546fedfda22584f79d3d423096e'Michael Niedermayer2015-01-15
|\| | | | | | | | | | | | | | | | | | | * commit '8a9641a652ed1546fedfda22584f79d3d423096e': bsf: check memory allocations Conflicts: libavcodec/noise_bsf.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * bsf: check memory allocationsVittorio Giovara2015-01-15
| |
* | avcodec/parser: add fuzzy mode to ff_fetch_timestamp()Michael Niedermayer2015-01-07
| | | | | | | | | | | | This will be needed for the following timestamp fix Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/parser: use av_freep() to avoid leaving stale pointers in memoryMichael Niedermayer2014-11-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Drop remaining unneeded != NULLMichael Niedermayer2014-08-15
| | | | | | | | | | Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '53abe32409f13687c864b3cda077a1aa906a2459'Michael Niedermayer2014-07-27
|\| | | | | | | | | | | | | | | | | | | * commit '53abe32409f13687c864b3cda077a1aa906a2459': avcodec: Mark argument in av_{parser|hwaccel|bitstream_filter}_next as const Conflicts: libavcodec/avcodec.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Mark argument in av_{parser|hwaccel|bitstream_filter}_next as constDiego Biurrun2014-07-26
| |
* | avcodec/parser: put lost comments backMichael Niedermayer2014-02-26
| | | | | | | | | | Found-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-02-25
|\| | | | | | | | | | | | | * qatar/master: parser: cosmetics: Drop some unnecessary parentheses Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * parser: cosmetics: Drop some unnecessary parenthesesDiego Biurrun2014-02-25
| |
* | Merge commit 'a1c699659d56b76c0bf399307f642c6fd6d28281'Michael Niedermayer2014-02-25
|\| | | | | | | | | | | | | | | | | | | * commit 'a1c699659d56b76c0bf399307f642c6fd6d28281': parser: K&R formatting cosmetics Conflicts: libavcodec/parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * parser: K&R formatting cosmeticsLuca Barbato2014-02-25
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'ed61f3ca8a0664a697782253b354055136c5d303'Michael Niedermayer2014-02-25
|\| | | | | | | | | | | | | * commit 'ed61f3ca8a0664a697782253b354055136c5d303': parser: Remove commented-out cruft Merged-by: Michael Niedermayer <michaelni@gmx.at>