avformat: simplify avformat_close_input
authorLuca Barbato <lu_zero@gentoo.org>
Mon, 10 Sep 2012 05:07:56 +0000 (07:07 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Fri, 14 Sep 2012 12:26:27 +0000 (14:26 +0200)
avio_close checks by itself for NULL condition.

libavformat/utils.c

index 81a4b34..3a829a9 100644 (file)
@@ -2709,8 +2709,8 @@ void avformat_close_input(AVFormatContext **ps)
         s->iformat->read_close(s);
     avformat_free_context(s);
     *ps = NULL;
         s->iformat->read_close(s);
     avformat_free_context(s);
     *ps = NULL;
-    if (pb)
-        avio_close(pb);
+
+    avio_close(pb);
 }
 
 AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c)
 }
 
 AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c)