From: Niklas Haas <g...@haasn.dev>

If changing YUV range after init results in the special converter no
longer being picked, then we need the rest of the init function to have
been hit.

Fixes: cedf589c09c567b72bf4c1a58db53d94622567e1
---
 libswscale/utils.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index 7ce86f83ea..294b0b5ace 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1721,7 +1721,9 @@ static av_cold int sws_init_single_context(SwsContext *c, 
SwsFilter *srcFilter,
             av_log(c, AV_LOG_INFO,
                     "alpha blendaway %s -> %s special converter is 
available\n",
                     av_get_pix_fmt_name(srcFormat), 
av_get_pix_fmt_name(dstFormat));
-        return 0;
+
+        if (isAnyRGB(dstFormat))
+            return 0;
     }
 
     /* unscaled special cases */
-- 
2.42.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to