This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/4.4 in repository ffmpeg.
commit 520a3042d2e1830e4e6e71d657234e4477aba19a Author: marcos ashton <[email protected]> AuthorDate: Mon Mar 23 14:08:35 2026 +0000 Commit: Michael Niedermayer <[email protected]> CommitDate: Tue May 5 18:55:09 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index 9875d0457a..15b9a103b0 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -284,7 +284,8 @@ static int remap##ws##_##bits##bit_slice(AVFilterContext *ctx, void *arg, int jo const AVFrame *in = td->in; \ AVFrame *out = td->out; \ \ - 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]
