[FFmpeg-cvslog] avcodec/xpmdec: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM
Paul B Mahol
git at videolan.org
Sat Sep 24 13:27:51 EEST 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Sep 24 11:54:43 2022 +0200| [3e49c1e07a945b88545381c373dfaf1c1b7c64c3] | committer: Paul B Mahol
avcodec/xpmdec: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e49c1e07a945b88545381c373dfaf1c1b7c64c3
---
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),
};
More information about the ffmpeg-cvslog
mailing list