diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2014-10-15 02:35:55 +0200 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-01-12 23:58:25 +0100 |
commit | bb823e26b1cbb91b475c10772cdfd867d4809a65 (patch) | |
tree | 1f43323ca6d9f168a5a40f746a697efb0360f7e2 | |
parent | b31bb39bdd7b5a53e0d282acc0f0f62b32b17acc (diff) | |
download | ffmpeg-bb823e26b1cbb91b475c10772cdfd867d4809a65.tar.gz |
avformat: Make avformat_free_context handle NULL
Work as the other free()-like functions.
Bug-Id: CID 1087081
CC: libav-stable@libav.org
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 73e3039421..94431e1923 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); |