summaryrefslogtreecommitdiff
path: root/libavcodec/m101.c
Commit message (Collapse)AuthorAge
* avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt2022-04-05
| | | | | | | | | | | This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Make FFCodec.decode use AVFrame*Andreas Rheinhardt2022-04-05
| | | | | | | | This increases type-safety by avoiding conversions from/through void*. It also avoids the boilerplate "AVFrame *frame = data;" line for non-subtitle decoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt2022-03-21
| | | | | | | | | | | | | | | | Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt2022-03-21
| | | | | | | | | | Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/m101: Mark decoder as init-threadsafeAndreas Rheinhardt2021-05-02
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-27
| | | | | | | | | | Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/m101: Fix off be 2 errorMichael Niedermayer2019-06-29
| | | | | | | | Fixes: out of array read Fixes: 15263/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_M101_fuzzer-5728999453491200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc: Remove CR/LF from avpriv_request_sample() calls.Carl Eugen Hoyos2016-12-03
|
* avcodec/m101: Ask for samples with too small extradata_sizeMichael Niedermayer2016-05-18
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/m101: Check BPS valueMichael Niedermayer2016-05-18
| | | | | | | Fixes null pointer dereference Fixes Ticket5520 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/m101: simplify 8bit codeMichael Niedermayer2016-05-07
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/m101: remove unneeded zeroing of priv_data_sizeMichael Niedermayer2016-05-07
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/m101: Simplify if() conditionMichael Niedermayer2016-05-07
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: add M101 decoderMichael Niedermayer2016-05-06
Fixes Ticket 2611 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>