summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4video_parser.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec: remove FF_API_FLAG_TRUNCATEDJames Almer2023-02-091-12/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: remove FF_API_AVCTX_TIMEBASEJames Almer2023-02-091-2/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mpeg4video: Factor non-codec stuff out into a header of its ownAndreas Rheinhardt2022-09-021-1/+1
| | | | | | This avoids including mpegvideo.h in mpeg4_unpack_bframes_bsf.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/internal: Move ff_set_dimensions() to decode.hAndreas Rheinhardt2022-08-271-1/+1
| | | | | | | | | Decoder-only, as the dimensions are set by the user when encoding. Also fixup the other headers a bit while removing unnecessary internal.h inclusions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4video.h: Move decoder-only parts to a new headerAndreas Rheinhardt2022-02-131-0/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4videodec: Fix data race when initializing VLCsAndreas Rheinhardt2022-01-091-2/+0
| | | | | | | | | | | | | | | | | Both the MPEG-4 parser as well as the decoder initialized several VLCs. There is a "static int done = 0;" in order to guard against initializing these multiple times, but this does not work when several threads try to initialize these VLCs concurrently, which can happen when initializing several parsers at the same time (they don't use the global lock that is used for codecs without the FF_CODEC_CAP_INIT_THREADSAFE cap; actually, they don't use any lock at all). Since ff_mpeg4_decode_picture_header() now aborts early when called from the parser, it no longer needs to have these VLCs initialized at all. This commit therefore does exactly this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4video: Skip unneeded element when parsing picture headerAndreas Rheinhardt2022-01-091-2/+2
| | | | | | | | | | Namely, skip some elements that are only useful for a decoder when calling ff_mpeg4_decode_picture_header() from the MPEG-4 parser. In particular, this ensures that the VLCs need no longer be initialized by the parser. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/(h263|mpeg4?video)_parser: Make *_find_frame_end() staticAndreas Rheinhardt2021-09-201-0/+15
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Move all AVCodecParser.split functions to remove_extradata_bsfAndreas Rheinhardt2021-04-271-1/+0
| | | | | | | 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 all the AVCodecParsersAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | Possible now that the next pointer no longer exists. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mpeg4videodec: Fix nonsense warningAndreas Rheinhardt2019-03-121-3/+3
| | | | | | | | | | | | Since db772308941a2a338c7809f90d347219a6a93074 parsing of mpeg4-extradata lead to a "Failed to parse extradata" warning, because ff_mpeg4_decode_picture_header returns AVERROR_INVALIDDATA in case that no VOP was found. This patch adds a parameter to signify whether a header (where the absence of a VOP does not raise an error) or not is parsed. The first mode is of course used for parsing headers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4video_parser: Avoid litteral 0x1B6, use named constant insteadMichael Niedermayer2018-04-301-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4video_parser: Fix incorrect spliting of MPEG-4 studio framesMichael Niedermayer2018-04-301-0/+2
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-1/+1
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avcodec/mpeg4video_parser: fix spurious extradata parse warningsMichael Niedermayer2014-11-151-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mpeg4video_parser: Check for extradata parsing failureMichael Niedermayer2014-07-311-0/+2
| | | | | | | | | | Found-by: CSA Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-02-201-4/+3
|\ \ | |/ | | | | | | | | | | * qatar/master: mpeg4video_parser: Drop pointless av_-prefix from static function Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg4video_parser: Drop pointless av_-prefix from static functionDiego Biurrun2014-02-201-4/+3
| |
* | Merge commit 'ff7ffe48097f32417781fe8b2b417eff05a52c55'Michael Niedermayer2013-12-061-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'ff7ffe48097f32417781fe8b2b417eff05a52c55': mpeg4videodec: move showed_packed_warning from MpegEncContext to Mpeg4DecContext Conflicts: libavcodec/mpeg4videodec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ee8af2dd99dcb7a01a667deedec81d1aa2a00d72'Michael Niedermayer2013-11-291-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'ee8af2dd99dcb7a01a667deedec81d1aa2a00d72': mpeg4videodec: move MpegEncContext.shape to Mpeg4DecContext Conflicts: libavcodec/h263dec.c libavcodec/mpeg4videodec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg4videodec: move MpegEncContext.shape to Mpeg4DecContextAnton Khirnov2013-11-291-2/+2
| |
* | Merge commit '35e0833d410e31d9fd35695ad798c5d13de2af58'Michael Niedermayer2013-11-291-5/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '35e0833d410e31d9fd35695ad798c5d13de2af58': mpeg4videodec: add a mpeg4-specific private context. Conflicts: libavcodec/mpeg4video_parser.c libavcodec/mpeg4videodec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg4videodec: add a mpeg4-specific private context.Anton Khirnov2013-11-291-3/+4
| |
* | Merge commit 'c68d4c230ad8ca85af3999a6af8e582c43620d58'Michael Niedermayer2013-11-021-35/+36
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'c68d4c230ad8ca85af3999a6af8e582c43620d58': mpeg4video_parser: K&R formatting cosmetics Conflicts: libavcodec/mpeg4video_parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg4video_parser: K&R formatting cosmeticsVittorio Giovara2013-11-021-34/+35
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '13207484bba8a8b78b40d5a22da8c9c555429089'Michael Niedermayer2013-11-011-1/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '13207484bba8a8b78b40d5a22da8c9c555429089': mpeg4video_parser: stop using deprecated avcodec_set_dimensions mpeg12dec: stop using deprecated avcodec_set_dimensions mjpegdec: stop using deprecated avcodec_set_dimensions libvpxdec: stop using deprecated avcodec_set_dimensions Conflicts: libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpeg4video_parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg4video_parser: stop using deprecated avcodec_set_dimensionsAnton Khirnov2013-10-311-1/+4
| |
* | lavc: don't show "Invalid and inefficient vfw-avi..." warning in mpeg4 parserwm42013-09-091-0/+1
| | | | | | | | | | | | Only the actual decoder should print this warning. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpeg4video_parser: init static tables before use, fix nulll ptr derefMichael Niedermayer2012-11-131-0/+2
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind 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
| |
* | mpeg4videoparser: support using timestamps from codec.Michael Niedermayer2012-05-221-0/+7
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-111-10/+12
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (38 commits) v210enc: remove redundant check for pix_fmt wavpack: allow user to disable CRC checking v210enc: Use Bytestream2 functions cafdec: Check return value of avio_seek and avoid modifying state if it fails yop: Check return value of avio_seek and avoid modifying state if it fails tta: Check return value of avio_seek and avoid modifying state if it fails tmv: Check return value of avio_seek and avoid modifying state if it fails r3d: Check return value of avio_seek and avoid modifying state if it fails nsvdec: Check return value of avio_seek and avoid modifying state if it fails mpc8: Check return value of avio_seek and avoid modifying state if it fails jvdec: Check return value of avio_seek and avoid modifying state if it fails filmstripdec: Check return value of avio_seek and avoid modifying state if it fails ffmdec: Check return value of avio_seek and avoid modifying state if it fails dv: Check return value of avio_seek and avoid modifying state if it fails bink: Check return value of avio_seek and avoid modifying state if it fails Check AVCodec.pix_fmts in avcodec_open2() svq3: Prevent illegal reads while parsing extradata. remove ParseContext1 vc1: use ff_parse_close mpegvideo parser: move specific fields into private context ... Conflicts: libavcodec/4xm.c libavcodec/aacdec.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/mpeg4video_parser.c libavcodec/svq3.c libavcodec/v210enc.c libavformat/cafdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpeg4video parser: move specific fields into private contextRafaël Carré2012-02-101-9/+11
| | | | | | | | | | | | This obviates using ParseContext1, which is slated for removal. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-071-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: flicvideo: fix invalid reads vorbis: Avoid some out-of-bounds reads vqf: add more known extensions cabac: remove unused function renorm_cabac_decoder h264: Only use symbols from the SVQ3 decoder under proper conditionals. add bytestream2_tell() and bytestream2_seek() functions parsers: initialize MpegEncContext.slice_context_count to 1 spdifenc: use special alignment for DTS-HD length_code Conflicts: libavcodec/flicvideo.c libavcodec/h264.c libavcodec/mpeg4video_parser.c libavcodec/vorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * parsers: initialize MpegEncContext.slice_context_count to 1Janne Grunau2012-01-061-0/+1
| | | | | | | | | | | | | | | | | | The mpeg4 video, H264 and VC-1 parser hold (directly or indirectly) a MpegEncContext in their private context. Since they do not call the common mpegvideo init function slice_context_count has explicitly set to 1. Prevents a null pointer dereference in the h264 parser and fixes bug 193.
* | mpeg4: disable checked bitstream reader, overreads are not possible.Michael Niedermayer2011-12-181-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-031-6/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-6/+6
| |
| * 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>
* | mpeg4parser: fix initial qp precissionMichael Niedermayer2011-10-171-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 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)
* Include mpeg4video.h: Needed for declaration of ff_mpeg4_decode_picture_header.Carl Eugen Hoyos2010-02-281-0/+1
| | | | Originally committed as revision 22100 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make sure the parsers do not overwrite width/height as this can interfereMichael Niedermayer2009-12-051-1/+1
| | | | | | | with the decoder. Fixes issue1135. Originally committed as revision 20736 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add missing av_cold in static init/close functions.Daniel Verkamp2009-02-221-1/+1
| | | | | | Patch by Daniel Verkamp daniel at drv dot nu. Originally committed as revision 17526 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-191-2/+2
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* move ff_mpeg4_find_frame_end() from h263dec.c to mpeg4video_parser.cAurelien Jacobs2007-05-091-0/+38
| | | | | | | now h263dec depends on mpeg4video_parser this fixes compilation when h263 decoder is disabled Originally committed as revision 8962 to svn://svn.ffmpeg.org/ffmpeg/trunk
* make some parser parameters const to avoid casting const to non-constAurelien Jacobs2007-05-071-3/+3
| | | | Originally committed as revision 8921 to svn://svn.ffmpeg.org/ffmpeg/trunk