]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mpegtsenc.c
Set cur_dts to 0 only during creating new streams and not every time cur_dts happens
[ffmpeg] / libavformat / mpegtsenc.c
index b5ba32d2ff2b7c2d8b6b8e32f6a85c2e655e9800..4a70a15f74500e03135c88caa9c9dbef24b759ce 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);
@@ -684,9 +684,9 @@ static int mpegts_write_end(AVFormatContext *s)
 
 AVOutputFormat mpegts_muxer = {
     "mpegts",
-    "MPEG2 transport stream format",
+    NULL_IF_CONFIG_SMALL("MPEG-2 transport stream format"),
     "video/x-mpegts",
-    "ts",
+    "ts,m2t",
     sizeof(MpegTSWrite),
     CODEC_ID_MP2,
     CODEC_ID_MPEG2VIDEO,