1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avcodec/xpmdec: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM

This commit is contained in:
Paul B Mahol 2022-09-24 11:54:43 +02:00
parent 08f6b1e5b3
commit 3e49c1e07a

View File

@ -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),
};