From a54da0831ca347e99f5e8f2050b4f102e3b177d8 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 24 Sep 2022 12:11:45 +0200 Subject: [PATCH] avcodec/photocd: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM --- libavcodec/photocd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/photocd.c b/libavcodec/photocd.c index f0e1ef7796..3030a80e0d 100644 --- a/libavcodec/photocd.c +++ b/libavcodec/photocd.c @@ -325,6 +325,9 @@ static int photocd_decode_frame(AVCodecContext *avctx, AVFrame *p, if (ret < 0) return ret; + if (avctx->skip_frame >= AVDISCARD_ALL) + return avpkt->size; + if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0) return ret; @@ -466,5 +469,6 @@ const FFCodec ff_photocd_decoder = { .close = photocd_decode_close, FF_CODEC_DECODE_CB(photocd_decode_frame), .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, + .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, CODEC_LONG_NAME("Kodak Photo CD"), };