diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-07 21:42:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-07 21:42:34 +0200 |
commit | 066d77650173185064b730da5e8040d898c2b45d (patch) | |
tree | 8451aa08f7963c142c24e04d9e44b23a45dc4c6b /libavformat/mpegtsenc.c | |
parent | cec59eb63feff145dbc4f8e2b8cf363e84b74d48 (diff) | |
parent | 6d6bd3a3db24747ae5e10716f4782129c38951f6 (diff) | |
download | ffmpeg-066d77650173185064b730da5e8040d898c2b45d.tar.gz |
Merge commit '6d6bd3a3db24747ae5e10716f4782129c38951f6'
* commit '6d6bd3a3db24747ae5e10716f4782129c38951f6':
mpegts: Drop some unnecessary parentheses
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r-- | libavformat/mpegtsenc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 1a72f8592d..ec6620f267 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -116,20 +116,20 @@ static void mpegts_write_section(MpegTSSection *s, uint8_t *buf, int len) buf[len - 4] = (crc >> 24) & 0xff; buf[len - 3] = (crc >> 16) & 0xff; buf[len - 2] = (crc >> 8) & 0xff; - buf[len - 1] = (crc) & 0xff; + buf[len - 1] = crc & 0xff; /* send each packet */ buf_ptr = buf; while (len > 0) { - first = (buf == buf_ptr); + first = buf == buf_ptr; q = packet; *q++ = 0x47; - b = (s->pid >> 8); + b = s->pid >> 8; if (first) b |= 0x40; *q++ = b; *q++ = s->pid; - s->cc = (s->cc + 1) & 0xf; + s->cc = s->cc + 1 & 0xf; *q++ = 0x10 | s->cc; if (first) *q++ = 0; /* 0 offset */ @@ -951,12 +951,12 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, /* prepare packet header */ q = buf; *q++ = 0x47; - val = (ts_st->pid >> 8); + val = ts_st->pid >> 8; if (is_start) 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 (key && is_start && pts != AV_NOPTS_VALUE) { // set Random Access for key frames |