diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-09-24 11:54:43 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-09-24 12:23:33 +0200 |
commit | 3e49c1e07a945b88545381c373dfaf1c1b7c64c3 (patch) | |
tree | 344199ce3f4b0d0957943b9353ebd67fa717c01b | |
parent | 08f6b1e5b3bc0c3d133cefb4e856ba83d7a93678 (diff) | |
download | ffmpeg-3e49c1e07a945b88545381c373dfaf1c1b7c64c3.tar.gz |
avcodec/xpmdec: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM
-rw-r--r-- | libavcodec/xpmdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
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), }; |