Regression with QTRLE codec, mp4 demux cannot play anymore
╰─$ git bisect bad
12030f5ccac852aaa3f9f66b20606d2fc344f8f4 is the first bad commit
commit 12030f5ccac852aaa3f9f66b20606d2fc344f8f4
Author: Steve Lhomme <robux4@ycbcr.xyz>
Date: Fri Sep 1 11:00:31 2023 +0200
avcodec: set bits_per_coded_sample using vlc_fourcc_GetChromaBPP()
bits_per_coded_sample should be 15 for VLC_CODEC_RGB15 which is what
this function returns.
modules/codec/avcodec/video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index e086d13e38f..203519bca5b 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -418,7 +418,7 @@ static int OpenVideoCodec( decoder_t *p_dec )
ctx->coded_height = p_dec->fmt_in->video.i_height;
}
- ctx->bits_per_coded_sample = p_dec->fmt_in->video.i_bits_per_pixel;
+ ctx->bits_per_coded_sample = vlc_fourcc_GetChromaBPP(p_dec->fmt_in->video.i_chroma);
p_sys->pix_fmt = AV_PIX_FMT_NONE;
cc_Init( &p_sys->cc );
Now fails with
[qtrle @ 0x76117804fc00] Unsupported colorspace: 0 bits/sample?
[0000761178024760] avcodec decoder error: cannot start codec (qtrle)
[0000761178024760] main decoder error: Codec `rle ' (Apple QuickTime RLE Video) is not supported.
[0000761178024760] main decoder error: Codec not supported
[0000761178024760] main decoder error: VLC could not decode the format "rle " (Apple QuickTime RLE Video)
Samples from #26891 (closed).