From fe06105c8a9ab4e873efdbea7cd00da1d0e1295c Mon Sep 17 00:00:00 2001 From: Lynne Date: Sun, 20 Sep 2026 15:17:17 +0900 Subject: [PATCH] prores_raw: parse the frame before honouring skip_frame The decoder returned before parsing anything when skip_frame was AVDISCARD_ALL, yet advertises FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, so it never set the pixel format and dimensions while probing. Probing gives up after probesize, and ProRes RAW frames are larger than the default, so ffmpeg failed to open such files at all with "Could not find codec parameters ... unspecified pixel format". Parse up to the tile table, which sets every stream parameter, before skipping the frame. --- libavcodec/prores_raw.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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