diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-04-24 12:07:37 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-04-24 12:40:58 +0200 |
commit | 512c064cd9e064fccd5809bc0928822a7324373d (patch) | |
tree | b7e05e0c5b9f4b6c42b0c398cf9d79cd203a6710 | |
parent | 7626fb6cbf5f4755c3f7591e99ca475dfadf4c7c (diff) | |
download | ffmpeg-512c064cd9e064fccd5809bc0928822a7324373d.tar.gz |
avformat/mux: Check that deinit is set before calling it
Fixes null pointer dereference
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c84ba07db4abd123b2ad93784e312a24d9341553)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/mux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c index 789c811cd8..f14bfd52d5 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -400,7 +400,8 @@ FF_ENABLE_DEPRECATION_WARNINGS } if (s->oformat->init && (ret = s->oformat->init(s)) < 0) { - s->oformat->deinit(s); + if (s->oformat->deinit) + s->oformat->deinit(s); goto fail; } |