This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/7.1 in repository ffmpeg.
commit 6444eb4b576dcef067cbafdc65d5950e121487d2 Author: marcos ashton <[email protected]> AuthorDate: Mon Mar 23 14:08:35 2026 +0000 Commit: Michael Niedermayer <[email protected]> CommitDate: Mon May 4 15:57:23 2026 +0200 libavfilter/vf_v360: fix operator precedence in stereo loop condition The loop condition in the DEFINE_REMAP macro: stereo < 1 + s->out_stereo > STEREO_2D is parsed by C as: (stereo < (1 + s->out_stereo)) > STEREO_2D Since STEREO_2D is 0 and relational operators return 0 or 1, the outer comparison against 0 is a no-op for STEREO_2D and STEREO_SBS. But for STEREO_TB (value 2) the loop runs 3 iterations instead of 2, producing an out-of-bounds stereo pass. Add parentheses so the comparison is evaluated first: stereo < 1 + (s->out_stereo > STEREO_2D) This gives 1 iteration for 2D and 2 for any stereo format (SBS or TB), matching the actual number of stereo views. Signed-off-by: marcos ashton <[email protected]> (cherry picked from commit 9559a6036d8b9e1481c0c8977e5e215ca5c23211) Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/vf_v360.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index 4ba389e335..3238bae6be 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -288,7 +288,7 @@ static int remap##ws##_##bits##bit_slice(AVFilterContext *ctx, void *arg, int jo \ av_assert1(s->nb_planes <= AV_VIDEO_MAX_PLANES); \ \ - for (int stereo = 0; stereo < 1 + s->out_stereo > STEREO_2D; stereo++) { \ + for (int stereo = 0; stereo < 1 + (s->out_stereo > STEREO_2D); stereo++) { \ for (int plane = 0; plane < s->nb_planes; plane++) { \ const unsigned map = s->map[plane]; \ const int in_linesize = in->linesize[plane]; \ _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
