]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/vc1test.c
Move WMA case from ff_get_audio_frame_size() to av_get_audio_frame_duration()
[ffmpeg] / libavformat / vc1test.c
index e5303fa46e7c5f17c4e6e6be0ad5d5d9e58a02ae..3afe398d8b1c45a9a86e900c16d200ba40dfffb2 100644 (file)
@@ -51,12 +51,12 @@ static int vc1t_read_header(AVFormatContext *s)
 
     frames = avio_rl24(pb);
     if(avio_r8(pb) != 0xC5 || avio_rl32(pb) != 4)
-        return -1;
+        return AVERROR_INVALIDDATA;
 
     /* init video codec */
     st = avformat_new_stream(s, NULL);
     if (!st)
-        return -1;
+        return AVERROR(ENOMEM);
 
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = AV_CODEC_ID_WMV3;
@@ -66,7 +66,7 @@ static int vc1t_read_header(AVFormatContext *s)
     st->codec->height = avio_rl32(pb);
     st->codec->width = avio_rl32(pb);
     if(avio_rl32(pb) != 0xC)
-        return -1;
+        return AVERROR_INVALIDDATA;
     avio_skip(pb, 8);
     fps = avio_rl32(pb);
     if(fps == 0xFFFFFFFF)
@@ -91,7 +91,7 @@ static int vc1t_read_packet(AVFormatContext *s,
     int keyframe = 0;
     uint32_t pts;
 
-    if(url_feof(pb))
+    if(avio_feof(pb))
         return AVERROR(EIO);
 
     frame_size = avio_rl24(pb);