]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/ffmdec.c
mpegts: Replace the MP4 descriptor parser with a recursive parser.
[ffmpeg] / libavformat / ffmdec.c
index dfd86cb28ba1518f46e564f9db6b8b7e8833ab32..61b6a2dafef044d830d07ee4c4443962ec53c141 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * FFM (ffserver live feed) demuxer
+ * FFM (avserver live feed) demuxer
  * Copyright (c) 2001 Fabrice Bellard
  *
  * This file is part of Libav.
  */
 
 #include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
 #include "avformat.h"
 #include "ffm.h"
-#if CONFIG_FFSERVER
+#if CONFIG_AVSERVER
 #include <unistd.h>
 
 int64_t ffm_read_write_index(int fd)
@@ -54,7 +55,7 @@ void ffm_set_write_index(AVFormatContext *s, int64_t pos, int64_t file_size)
     ffm->write_index = pos;
     ffm->file_size = file_size;
 }
-#endif // CONFIG_FFSERVER
+#endif // CONFIG_AVSERVER
 
 static int ffm_is_avail_data(AVFormatContext *s, int size)
 {
@@ -289,7 +290,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
     for(i=0;i<nb_streams;i++) {
         char rc_eq_buf[128];
 
-        st = av_new_stream(s, 0);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             goto fail;
 
@@ -300,7 +301,6 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
         codec->codec_id = avio_rb32(pb);
         codec->codec_type = avio_r8(pb); /* codec_type */
         codec->bit_rate = avio_rb32(pb);
-        st->quality = avio_rb32(pb);
         codec->flags = avio_rb32(pb);
         codec->flags2 = avio_rb32(pb);
         codec->debug = avio_rb32(pb);
@@ -344,7 +344,6 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
             codec->thread_count = avio_r8(pb);
             codec->coder_type = avio_rb32(pb);
             codec->me_cmp = avio_rb32(pb);
-            codec->partitions = avio_rb32(pb);
             codec->me_subpel_quality = avio_rb32(pb);
             codec->me_range = avio_rb32(pb);
             codec->keyint_min = avio_rb32(pb);
@@ -354,7 +353,6 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
             codec->qblur = av_int2dbl(avio_rb64(pb));
             codec->max_qdiff = avio_rb32(pb);
             codec->refs = avio_rb32(pb);
-            codec->directpred = avio_rb32(pb);
             break;
         case AVMEDIA_TYPE_AUDIO:
             codec->sample_rate = avio_rb32(pb);
@@ -509,12 +507,12 @@ static int ffm_probe(AVProbeData *p)
 }
 
 AVInputFormat ff_ffm_demuxer = {
-    "ffm",
-    NULL_IF_CONFIG_SMALL("FFM (FFserver live feed) format"),
-    sizeof(FFMContext),
-    ffm_probe,
-    ffm_read_header,
-    ffm_read_packet,
-    ffm_close,
-    ffm_seek,
+    .name           = "ffm",
+    .long_name      = NULL_IF_CONFIG_SMALL("FFM (AVserver live feed) format"),
+    .priv_data_size = sizeof(FFMContext),
+    .read_probe     = ffm_probe,
+    .read_header    = ffm_read_header,
+    .read_packet    = ffm_read_packet,
+    .read_close     = ffm_close,
+    .read_seek      = ffm_seek,
 };