OSDN Git Service

avformat_free_context: allow NULL as argument
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 20 Oct 2012 17:48:26 +0000 (19:48 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 20 Oct 2012 18:13:18 +0000 (20:13 +0200)
Fixes CID703682
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index be1be00..f27104e 100644 (file)
@@ -3018,6 +3018,9 @@ void avformat_free_context(AVFormatContext *s)
 {
     int i;
 
+    if (!s)
+        return;
+
     av_opt_free(s);
     if (s->iformat && s->iformat->priv_class && s->priv_data)
         av_opt_free(s->priv_data);