diff --git a/libavcodec/prores_raw.c b/libavcodec/prores_raw.c index 28f9b54a59..0b8fc6ac15 100644 --- a/libavcodec/prores_raw.c +++ b/libavcodec/prores_raw.c @@ -337,9 +337,6 @@ static int decode_frame(AVCodecContext *avctx, DECLARE_ALIGNED(32, uint8_t, qmat)[64]; memset(qmat, 1, 64); - if (avctx->skip_frame >= AVDISCARD_ALL) - return avpkt->size; - switch (avctx->codec_tag) { case 0: break; @@ -517,6 +514,11 @@ static int decode_frame(AVCodecContext *avctx, } av_assert1(n == s->nb_tiles); + /* The stream parameters are all set by now, which is all that probing + * with frames skipped needs */ + if (avctx->skip_frame >= AVDISCARD_ALL) + return avpkt->size; + /** * Any data between last tile and frame end is vendor-specific metadata: * [psim record] 4 be32 size + "psim" + pascal string + payload