Skip to content
Snippets Groups Projects
Commit a3896968 authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Jean-Baptiste Kempf
Browse files

mp4: essetup: fix QTRLE decoding

Video using the ffmpeg qtrle decoder are failing to play 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)

Indeed, QTRLE format can compress source with either 1, 2, 4, 8, 16, 24
or 32 bpp, and the actual bpp is stored in the stst atom, not in the
decoder payload. The demux has to forward this value to the decoder one
way or another.

Regression from 12030f5ccac852aaa3f9f66b20606d2fc344f8f4, which starts
setting the bpp to zero in avcodec because there is no chroma yet.
Defining a chroma instead of forwarding the bpp would be possible for 8,
16, 24 RLE data cases, but would not work for lower RLE data cases.

The correct i_bits_per_pixel field being removed in commit
1d46d8b7, a hack is implemented instead.
The hack is from 3e5f2e5d and other
places that needed it.

Fixes #28550
parent 15902159
No related branches found
No related tags found
1 merge request!5010mp4: essetup: fix QTRLE decoding
Pipeline #444931 passed with stages
in 34 minutes and 39 seconds
......@@ -815,6 +815,10 @@ int SetupVideoES( demux_t *p_demux, const mp4_track_t *p_track, const MP4_Box_t
break;
}
/* Codec like QTRLE will need to provide depth. */
if (p_fmt->i_profile == -1 && p_fmt->i_level == -1 &&
p_fmt->video.i_chroma == 0)
p_fmt->i_level = p_vide->i_depth;
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment