]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/siff.c
lavf: move ff_put_str16_nolen from asf to avio and rename it
[ffmpeg] / libavformat / siff.c
index 63fc0d6fac93bc4ed501293fa0c14c225c67ccb0..3a0b9bb377a5c0860898776902053c9e7588d89f 100644 (file)
@@ -60,11 +60,12 @@ typedef struct SIFFContext{
 
 static int siff_probe(AVProbeData *p)
 {
+    uint32_t tag = AV_RL32(p->buf + 8);
     /* check file header */
-    if (AV_RL32(p->buf) == TAG_SIFF)
-        return AVPROBE_SCORE_MAX;
-    else
+    if (AV_RL32(p->buf) != TAG_SIFF ||
+        (tag != TAG_VBV1 && tag != TAG_SOUN))
         return 0;
+    return AVPROBE_SCORE_MAX;
 }
 
 static int create_audio_stream(AVFormatContext *s, SIFFContext *c)
@@ -73,7 +74,7 @@ static int create_audio_stream(AVFormatContext *s, SIFFContext *c)
     ast = av_new_stream(s, 0);
     if (!ast)
         return -1;
-    ast->codec->codec_type      = CODEC_TYPE_AUDIO;
+    ast->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
     ast->codec->codec_id        = CODEC_ID_PCM_U8;
     ast->codec->channels        = 1;
     ast->codec->bits_per_coded_sample = c->bits;
@@ -117,7 +118,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, ByteIOContext *pb
     st = av_new_stream(s, 0);
     if (!st)
         return -1;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_VB;
     st->codec->codec_tag  = MKTAG('V', 'B', 'V', '1');
     st->codec->width      = width;
@@ -215,7 +216,7 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt)
             c->curstrm = 0;
         }
         if(!c->cur_frame || c->curstrm)
-            pkt->flags |= PKT_FLAG_KEY;
+            pkt->flags |= AV_PKT_FLAG_KEY;
         if (c->curstrm == -1)
             c->cur_frame++;
     }else{