avformat/utils: free s->pb for image2 as it can be used with and without a file
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 13 Sep 2014 20:56:05 +0000 (22:56 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 13 Sep 2014 21:25:17 +0000 (23:25 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index d6e3e50..e899e4d 100644 (file)
@@ -3548,7 +3548,7 @@ void avformat_close_input(AVFormatContext **ps)
     s  = *ps;
     pb = s->pb;
 
-    if ((s->iformat && s->iformat->flags & AVFMT_NOFILE) ||
+    if ((s->iformat && strcmp(s->iformat->name, "image2") && s->iformat->flags & AVFMT_NOFILE) ||
         (s->flags & AVFMT_FLAG_CUSTOM_IO))
         pb = NULL;