fix continuity counter to start at 0
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Tue, 3 Jun 2008 00:53:33 +0000 (00:53 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Tue, 3 Jun 2008 00:53:33 +0000 (00:53 +0000)
Originally committed as revision 13641 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/mpegtsenc.c

index b5ba32d..a3cc428 100644 (file)
@@ -61,8 +61,8 @@ 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;
         *q++ = 0x10 | s->cc;
+        s->cc = (s->cc + 1) & 0xf;
         if (first)
             *q++ = 0; /* 0 offset */
         len1 = TS_PACKET_SIZE - (q - packet);