This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit ce2ca1a18689de7915b644e4afaa61e20ade6854 Author: Niklas Haas <[email protected]> AuthorDate: Sat Mar 28 18:47:54 2026 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Thu Apr 16 23:23:36 2026 +0200 swscale/ops_optimizer: fix commutation of U32 clear + swap_bytes This accidentally unconditionally overwrote the entire clear mask, since Q(n) always set the denominator to 1, resulting in all channels being cleared instead of just the ones with nonzero denominators. Signed-off-by: Niklas Haas <[email protected]> --- libswscale/ops_optimizer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libswscale/ops_optimizer.c b/libswscale/ops_optimizer.c index 7df5549fe8..ec6581e9f7 100644 --- a/libswscale/ops_optimizer.c +++ b/libswscale/ops_optimizer.c @@ -39,7 +39,7 @@ */ static bool op_commute_clear(SwsOp *op, SwsOp *next) { - SwsClearOp tmp; + SwsClearOp tmp = {0}; av_assert1(op->op == SWS_OP_CLEAR); switch (next->op) { @@ -65,6 +65,8 @@ static bool op_commute_clear(SwsOp *op, SwsOp *next) return true; case SWS_PIXEL_U32: for (int i = 0; i < 4; i++) { + if (!op->clear.value[i].den) + continue; uint32_t v = av_bswap32(op->clear.value[i].num); if (v > INT_MAX) return false; /* can't represent as AVRational anymore */ _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
