Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-10-15 04:35:55 +0400
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-10-17 12:55:46 +0400
commit0db6bbb24c1a9f6b5527f460361a5a4132248eee (patch)
tree6107828d7720d443f8a8f080302c900db95b7560 /libavformat
parentc92965dbfbb7e2b49df14db2fd0e23a29295730a (diff)
avformat: Make avformat_free_context handle NULL
Work as the other free()-like functions. Bug-Id: CID 1087081 CC: libav-stable@libav.org
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index ef2d89f076..3ea0ebd9d6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2434,6 +2434,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);