]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/nsvdec.c
lavf/movenc: fix tmcd writing for non-MP4/MOV modes
[ffmpeg] / libavformat / nsvdec.c
index d8ce656817cab7009362d692fee25d14d006f772..7aa1b605b07c5ba48c9630a9905f6d50ac4c937a 100644 (file)
@@ -176,6 +176,7 @@ typedef struct NSVContext {
     int16_t avsync;
     AVRational framerate;
     uint32_t *nsvs_timestamps;
+    int nsvf;
 } NSVContext;
 
 static const AVCodecTag nsv_codec_video_tags[] = {
@@ -266,6 +267,12 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
 
     nsv->state = NSV_UNSYNC; /* in case we fail */
 
+    if (nsv->nsvf) {
+        av_log(s, AV_LOG_TRACE, "Multiple NSVf\n");
+        return 0;
+    }
+    nsv->nsvf = 1;
+
     size = avio_rl32(pb);
     if (size < 28)
         return -1;
@@ -690,7 +697,7 @@ static int nsv_read_close(AVFormatContext *s)
     return 0;
 }
 
-static int nsv_probe(AVProbeData *p)
+static int nsv_probe(const AVProbeData *p)
 {
     int i, score = 0;