lavf/concatdec: do not transfer custom IO flag
authorClément Bœsch <cboesch@gopro.com>
Mon, 22 May 2017 14:55:28 +0000 (16:55 +0200)
committerClément Bœsch <cboesch@gopro.com>
Mon, 22 May 2017 14:55:30 +0000 (16:55 +0200)
If the source is using a custom IO, setting this flag causes heavy leaks
since the segments will not have their avio context closed.

Regression since f5da453b068f55d335ca403d2e2b4dd2ac3d4331.

libavformat/concatdec.c

index 73f8a63..e57e5ce 100644 (file)
@@ -324,7 +324,7 @@ static int open_file(AVFormatContext *avf, unsigned fileno)
     if (!cat->avf)
         return AVERROR(ENOMEM);
 
-    cat->avf->flags |= avf->flags;
+    cat->avf->flags |= avf->flags & ~AVFMT_FLAG_CUSTOM_IO;
     cat->avf->interrupt_callback = avf->interrupt_callback;
 
     if ((ret = ff_copy_whiteblacklists(cat->avf, avf)) < 0)