mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-28 10:04:37 +08:00
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.
This commit is contained in:
1 parent
3110b21964
commit
fe06105c8a
1 file changed
+5
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user