summaryrefslogtreecommitdiff
path: root/libavcodec/cri.c
Commit message (Collapse)AuthorAge
* 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/cri: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cri: Stop the bitreader at the end of uncompressed inputMichael Niedermayer2021-02-22
| | | | | | | | | Fixes: Timeout Fixes: 29983/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6420415838814208 Fixes: 30595/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6559089360502784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cri: Use ff_set_dimensions()Michael Niedermayer2021-02-02
| | | | | | | | | Fixes: out of memory Fixes: 29985/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6424425392111616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cri: Fix whitespace issue in unpack_10bit()Michael Niedermayer2021-01-26
| | | | | Found-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cri: check for available input in unpack_10bit()Michael Niedermayer2021-01-21
| | | | | | | | Fixes: Timeout (>20sec -> 56ms) Fixes: 26995/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-5107217080254464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cri: Make decoder init-threadsafeAndreas Rheinhardt2020-12-04
| | | | | | | | | | | | | | The only thing that stands in the way of adding the FF_CODEC_CAP_INIT_THREADSAFE flag to the Cintel RAW decoder is its usage of ff_codec_open2_recursive(): This function requires its caller to hold the lock for the mutex that guards initialization of AVCodecContexts whose codecs have a non-threadsafe init function and only callers whose codec does not have the FF_CODEC_CAP_INIT_THREADSAFE flag set hold said lock (the others don't need to care about said lock). But one can set the flag if one switches to avcodec_open2() at the same time. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cri: Check for end of image in unpack_10bit()Michael Niedermayer2020-10-20
| | | | | | | | Fixes: out of array write Fixes: 26242/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-5161495882891264 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: add Cintel RAW decoderPaul B Mahol2020-10-07