mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/osq: Implement flush()
Fixes: out of array access Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6227491892887552 Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6268561729126400 Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6414805046788096 Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6538151088488448 Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-6608131540779008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
545686e49e
commit
c75fccd1d4
@ -61,6 +61,14 @@ typedef struct OSQContext {
|
||||
int pkt_offset;
|
||||
} OSQContext;
|
||||
|
||||
static void osq_flush(AVCodecContext *avctx)
|
||||
{
|
||||
OSQContext *s = avctx->priv_data;
|
||||
|
||||
s->bitstream_size = 0;
|
||||
s->pkt_offset = 0;
|
||||
}
|
||||
|
||||
static av_cold int osq_close(AVCodecContext *avctx)
|
||||
{
|
||||
OSQContext *s = avctx->priv_data;
|
||||
@ -478,4 +486,5 @@ const FFCodec ff_osq_decoder = {
|
||||
AV_SAMPLE_FMT_S16P,
|
||||
AV_SAMPLE_FMT_S32P,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
.flush = osq_flush,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user