1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-10-06 05:47:18 +02:00

prores_raw: set profile based on the codec tag

This is the same as what the parser does.
This commit is contained in:
Lynne
2025-08-28 15:12:52 +09:00
parent cb5dbb30ca
commit bc4d03c530

View File

@@ -334,6 +334,21 @@ static int decode_frame(AVCodecContext *avctx,
DECLARE_ALIGNED(32, uint8_t, qmat)[64];
memset(qmat, 1, 64);
switch (avctx->codec_tag) {
case 0:
break;
case MKTAG('a','p','r','n'):
avctx->profile = AV_PROFILE_PRORES_RAW;
break;
case MKTAG('a','p','r','h'):
avctx->profile = AV_PROFILE_PRORES_RAW_HQ;
break;
default:
avpriv_request_sample(avctx, "Profile %d", avctx->codec_tag);
return AVERROR_PATCHWELCOME;
break;
}
GetByteContext gb;
bytestream2_init(&gb, avpkt->data, avpkt->size);
if (bytestream2_get_be32(&gb) != avpkt->size)