avformat/mlvdec: close any additional .Mxx files
authorPeter Ross <pross@xvid.org>
Sun, 27 Apr 2014 02:44:16 +0000 (12:44 +1000)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 27 Apr 2014 13:34:27 +0000 (15:34 +0200)
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mlvdec.c

index 4dcf52b..a980ed6 100644 (file)
@@ -452,6 +452,10 @@ static int read_seek(AVFormatContext *avctx, int stream_index, int64_t timestamp
 static int read_close(AVFormatContext *s)
 {
     MlvContext *mlv = s->priv_data;
+    int i;
+    for (i = 0; i < 100; i++)
+        if (mlv->pb[i])
+            avio_close(mlv->pb[i]);
     return 0;
 }