WAV muxer: add RF64 support
[ffmpeg.git] / libavformat / vc1test.c
index 838dd43..e411a25 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "libavutil/intreadwrite.h"
 #include "avformat.h"
+#include "internal.h"
 
 #define VC1_EXTRADATA_SIZE 4
 
@@ -41,8 +42,7 @@ static int vc1t_probe(AVProbeData *p)
     return AVPROBE_SCORE_MAX/2;
 }
 
-static int vc1t_read_header(AVFormatContext *s,
-                           AVFormatParameters *ap)
+static int vc1t_read_header(AVFormatContext *s)
 {
     AVIOContext *pb = s->pb;
     AVStream *st;
@@ -54,12 +54,12 @@ static int vc1t_read_header(AVFormatContext *s,
         return -1;
 
     /* init video codec */
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         return -1;
 
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-    st->codec->codec_id = CODEC_ID_WMV3;
+    st->codec->codec_id = AV_CODEC_ID_WMV3;
 
     st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE);
     st->codec->extradata_size = VC1_EXTRADATA_SIZE;
@@ -68,16 +68,16 @@ static int vc1t_read_header(AVFormatContext *s,
     st->codec->width = avio_rl32(pb);
     if(avio_rl32(pb) != 0xC)
         return -1;
-    url_fskip(pb, 8);
+    avio_skip(pb, 8);
     fps = avio_rl32(pb);
     if(fps == 0xFFFFFFFF)
-        av_set_pts_info(st, 32, 1, 1000);
+        avpriv_set_pts_info(st, 32, 1, 1000);
     else{
         if (!fps) {
             av_log(s, AV_LOG_ERROR, "Zero FPS specified, defaulting to 1 FPS\n");
             fps = 1;
         }
-        av_set_pts_info(st, 24, 1, fps);
+        avpriv_set_pts_info(st, 24, 1, fps);
         st->duration = frames;
     }
 
@@ -110,11 +110,10 @@ static int vc1t_read_packet(AVFormatContext *s,
 }
 
 AVInputFormat ff_vc1t_demuxer = {
-    "vc1test",
-    NULL_IF_CONFIG_SMALL("VC-1 test bitstream format"),
-    0,
-    vc1t_probe,
-    vc1t_read_header,
-    vc1t_read_packet,
-    .flags = AVFMT_GENERIC_INDEX,
+    .name           = "vc1test",
+    .long_name      = NULL_IF_CONFIG_SMALL("VC-1 test bitstream"),
+    .read_probe     = vc1t_probe,
+    .read_header    = vc1t_read_header,
+    .read_packet    = vc1t_read_packet,
+    .flags          = AVFMT_GENERIC_INDEX,
 };