mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
avcodec/rscc: fix decoding of some iscc files
This commit is contained in:
parent
a5278b672a
commit
068412f2e8
@ -85,8 +85,18 @@ static av_cold int rscc_init(AVCodecContext *avctx)
|
||||
|
||||
/* Get pixel format and the size of the pixel */
|
||||
if (avctx->codec_tag == MKTAG('I', 'S', 'C', 'C')) {
|
||||
avctx->pix_fmt = AV_PIX_FMT_BGRA;
|
||||
ctx->component_size = 4;
|
||||
if (avctx->extradata && avctx->extradata_size == 4) {
|
||||
if ((avctx->extradata[0] >> 1) & 1) {
|
||||
avctx->pix_fmt = AV_PIX_FMT_BGRA;
|
||||
ctx->component_size = 4;
|
||||
} else {
|
||||
avctx->pix_fmt = AV_PIX_FMT_BGR24;
|
||||
ctx->component_size = 3;
|
||||
}
|
||||
} else {
|
||||
avctx->pix_fmt = AV_PIX_FMT_BGRA;
|
||||
ctx->component_size = 4;
|
||||
}
|
||||
} else if (avctx->codec_tag == MKTAG('R', 'S', 'C', 'C')) {
|
||||
ctx->component_size = avctx->bits_per_coded_sample / 8;
|
||||
switch (avctx->bits_per_coded_sample) {
|
||||
|
Loading…
Reference in New Issue
Block a user