aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-02-20 03:32:38 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2024-02-21 18:24:17 +0100
commite9cc9e492f987ce23ce8c514258a17952dd20401 (patch)
treead12ffeb501275d61a9021f7bb013e642a50ba79
parentf9906911f0b7ed7214675c23139ccaac30592474 (diff)
downloadffmpeg-e9cc9e492f987ce23ce8c514258a17952dd20401.tar.gz
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>
-rw-r--r--libswscale/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index d27128e42f..ab8a68e241 100644
--- a/libswscale/utils.c
+++ b/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) {