]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mpegtsenc.c
Add missing header #includes.
[ffmpeg] / libavformat / mpegtsenc.c
index b5a63e87eda56edd25e222570763d509ace6213c..4a70a15f74500e03135c88caa9c9dbef24b759ce 100644 (file)
@@ -18,8 +18,9 @@
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
+
+#include "libavutil/crc.h"
 #include "avformat.h"
-#include "crc.h"
 #include "mpegts.h"
 
 /* write DVB SI sections */
@@ -43,7 +44,7 @@ static void mpegts_write_section(MpegTSSection *s, uint8_t *buf, int len)
     unsigned char *q;
     int first, b, len1, left;
 
-    crc = bswap_32(av_crc(av_crc04C11DB7, -1, buf, len - 4));
+    crc = bswap_32(av_crc(av_crc_get_table(AV_CRC_32_IEEE), -1, buf, len - 4));
     buf[len - 4] = (crc >> 24) & 0xff;
     buf[len - 3] = (crc >> 16) & 0xff;
     buf[len - 2] = (crc >> 8) & 0xff;
@@ -60,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);
@@ -683,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,