libswscale/utils: Fix bayer to yuvj

Fixes: out of array access.

Earlier code assumes that a unscaled bayer to yuvj420 converter exists
but the later code then skips yuvj420

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.0
Michael Niedermayer 9 months ago
parent f9906911f0
commit e9cc9e492f
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 3
      libswscale/utils.c

@ -1728,7 +1728,8 @@ static av_cold int sws_init_single_context(SwsContext *c, SwsFilter *srcFilter,
/* unscaled special cases */
if (unscaled && !usesHFilter && !usesVFilter &&
(c->srcRange == c->dstRange || isAnyRGB(dstFormat) ||
isFloat(srcFormat) || isFloat(dstFormat))){
isFloat(srcFormat) || isFloat(dstFormat) || isBayer(srcFormat))){
ff_get_unscaled_swscale(c);
if (c->convert_unscaled) {

Loading…
Cancel
Save