[FFmpeg-cvslog] swscale/utils: fix sws_getCachedContext check
Niklas Haas
git at videolan.org
Wed Dec 18 18:31:02 EET 2024
ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Mon Dec 16 12:25:44 2024 +0100| [2df655bc2cf8bc83e282a779b17192555860dc77] | committer: Niklas Haas
swscale/utils: fix sws_getCachedContext check
This logic was inverted, but || was not replaced by &&.
Fixes: ed5dd675624c83d9c69b406ce30e4e09f29970e3
Fixes: ticket #11353
Signed-off-by: Niklas Haas <git at haasn.dev>
Sponsored-by: Sovereign Tech Fund
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2df655bc2cf8bc83e282a779b17192555860dc77
---
libswscale/utils.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 32f90e366e..4dedbfc394 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list