mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-29 02:42:21 +00:00
lavc/jpeg2000dec: Allow to force a compatible pix_fmt.
This copies the behaviour of the libopenjpeg decoder. Fixes ticket #5919.
This commit is contained in:
parent
d5bf704f50
commit
cbe3f1b1fb
@ -402,6 +402,10 @@ static int get_siz(Jpeg2000DecoderContext *s)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( s->avctx->pix_fmt != AV_PIX_FMT_NONE
|
||||
&& !pix_fmt_match(s->avctx->pix_fmt, ncomponents, s->precision, log2_chroma_wh, s->pal8))
|
||||
s->avctx->pix_fmt = AV_PIX_FMT_NONE;
|
||||
if (s->avctx->pix_fmt == AV_PIX_FMT_NONE)
|
||||
for (i = 0; i < possible_fmts_nb; ++i) {
|
||||
if (pix_fmt_match(possible_fmts[i], ncomponents, s->precision, log2_chroma_wh, s->pal8)) {
|
||||
s->avctx->pix_fmt = possible_fmts[i];
|
||||
|
Loading…
Reference in New Issue
Block a user