[FFmpeg-cvslog] avcodec/exr: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM

Paul B Mahol git at videolan.org
Sat Sep 24 13:27:43 EEST 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Sep 24 11:27:28 2022 +0200| [cea1e1f261b8d185df7effceedc135cbb6be4681] | committer: Paul B Mahol

avcodec/exr: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cea1e1f261b8d185df7effceedc135cbb6be4681
---

 libavcodec/exr.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index f10754d6ae..6a0af96ce4 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -2121,6 +2121,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture,
 
     ff_set_sar(s->avctx, av_d2q(av_int2float(s->sar), 255));
 
+    if (avctx->skip_frame >= AVDISCARD_ALL)
+        return avpkt->size;
+
     s->desc          = av_pix_fmt_desc_get(avctx->pix_fmt);
     if (!s->desc)
         return AVERROR_INVALIDDATA;
@@ -2351,5 +2354,6 @@ const FFCodec ff_exr_decoder = {
     FF_CODEC_DECODE_CB(decode_frame),
     .p.capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
                         AV_CODEC_CAP_SLICE_THREADS,
+    .caps_internal    = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
     .p.priv_class     = &exr_class,
 };



More information about the ffmpeg-cvslog mailing list