1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

swscale/utils: fix sws_getCachedContext check

This logic was inverted, but || was not replaced by &&.

Fixes: ed5dd67562
Fixes: ticket #11353
Signed-off-by: Niklas Haas <git@haasn.dev>
Sponsored-by: Sovereign Tech Fund
This commit is contained in:
Niklas Haas 2024-12-16 12:25:44 +01:00
parent d1e37eb0cd
commit 2df655bc2c

View File

@ -2548,14 +2548,14 @@ SwsContext *sws_getCachedContext(SwsContext *prev, int srcW,
if (!param)
param = default_param;
if (prev && (prev->src_w == srcW ||
prev->src_h == srcH ||
prev->src_format == srcFormat ||
prev->dst_w == dstW ||
prev->dst_h == dstH ||
prev->dst_format == dstFormat ||
prev->flags == flags ||
prev->scaler_params[0] == param[0] ||
if (prev && (prev->src_w == srcW &&
prev->src_h == srcH &&
prev->src_format == srcFormat &&
prev->dst_w == dstW &&
prev->dst_h == dstH &&
prev->dst_format == dstFormat &&
prev->flags == flags &&
prev->scaler_params[0] == param[0] &&
prev->scaler_params[1] == param[1])) {
return prev;
}