]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mpc8.c
Refuse to mux tta into matroska, the output file is broken.
[ffmpeg] / libavformat / mpc8.c
index 011c7c8e645fd0b049609e30fe0de7dc440c71b5..73f805711d234a099f943f621767197b5a180974 100644 (file)
@@ -139,6 +139,11 @@ static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
     int i, t, seekd;
     GetBitContext gb;
 
+    if (s->nb_streams<=0) {
+        av_log(s, AV_LOG_ERROR, "cannot parse stream table before stream header\n");
+        return;
+    }
+
     avio_seek(s->pb, off, SEEK_SET);
     mpc8_get_chunk_header(s->pb, &tag, &size);
     if(tag != TAG_SEEKTABLE){