This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 4c0dff08781d4657c14a237fbc8df78f099490eb Author: Jun Zhao <[email protected]> AuthorDate: Sun Mar 29 16:19:12 2026 +0800 Commit: Jun Zhao <[email protected]> CommitDate: Sun Mar 29 11:06:36 2026 +0000 lavf/mpegtsenc: Add parentheses to clarify operator precedence in CC update While "cc + 1 & 0xf" is technically correct because addition has higher precedence than bitwise AND in C, the intent of "(cc + 1) & 0xf" is not immediately obvious without recalling the precedence table. Add explicit parentheses to make the intended evaluation order clear and improve readability. Signed-off-by: Jun Zhao <[email protected]> --- libavformat/mpegtsenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 3578c3fd46..7f76883531 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -170,7 +170,7 @@ static void mpegts_write_section(MpegTSSection *s, uint8_t *buf, int len) b |= 0x40; *q++ = b; *q++ = s->pid; - s->cc = s->cc + 1 & 0xf; + s->cc = (s->cc + 1) & 0xf; *q++ = 0x10 | s->cc; if (s->discontinuity) { q[-1] |= 0x20; @@ -1583,7 +1583,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, val |= 0x40; *q++ = val; *q++ = ts_st->pid; - ts_st->cc = ts_st->cc + 1 & 0xf; + ts_st->cc = (ts_st->cc + 1) & 0xf; *q++ = 0x10 | ts_st->cc; // payload indicator + CC if (ts_st->discontinuity) { set_af_flag(buf, 0x80); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
