From 36ea35bbc0e3364d7725a0eed8ebde258a3e75fd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 13 Sep 2014 22:56:05 +0200 Subject: [PATCH] avformat/utils: free s->pb for image2 as it can be used with and without a file Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index d6e3e50d66..e899e4d071 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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;