From 3e49c1e07a945b88545381c373dfaf1c1b7c64c3 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 24 Sep 2022 11:54:43 +0200 Subject: [PATCH] avcodec/xpmdec: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM --- libavcodec/xpmdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/xpmdec.c b/libavcodec/xpmdec.c index d0e5d696e7..ff1f51dd32 100644 --- a/libavcodec/xpmdec.c +++ b/libavcodec/xpmdec.c @@ -360,6 +360,9 @@ static int xpm_decode_frame(AVCodecContext *avctx, AVFrame *p, if (end - ptr < 1) return AVERROR_INVALIDDATA; + if (avctx->skip_frame >= AVDISCARD_ALL) + return avpkt->size; + if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret; @@ -443,5 +446,6 @@ const FFCodec ff_xpm_decoder = { .p.capabilities = AV_CODEC_CAP_DR1, .priv_data_size = sizeof(XPMDecContext), .close = xpm_decode_close, + .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, FF_CODEC_DECODE_CB(xpm_decode_frame), };