Module: libav
Branch: release/11
Commit: bb823e26b1cbb91b475c10772cdfd867d4809a65

Author:    Luca Barbato <[email protected]>
Committer: Vittorio Giovara <[email protected]>
Date:      Wed Oct 15 02:35:55 2014 +0200

avformat: Make avformat_free_context handle NULL

Work as the other free()-like functions.

Bug-Id: CID 1087081
CC: [email protected]

---

 libavformat/utils.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 73e3039..94431e1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2447,6 +2447,9 @@ void avformat_free_context(AVFormatContext *s)
     int i, j;
     AVStream *st;
 
+    if (!s)
+        return;
+
     av_opt_free(s);
     if (s->iformat && s->iformat->priv_class && s->priv_data)
         av_opt_free(s->priv_data);

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to