[FFmpeg-cvslog] avformat/mux: Check that deinit is set before calling it

Michael Niedermayer git at videolan.org
Tue Apr 26 02:48:38 CEST 2016


ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Sun Apr 24 12:07:37 2016 +0200| [512c064cd9e064fccd5809bc0928822a7324373d] | committer: Michael Niedermayer

avformat/mux: Check that deinit is set before calling it

Fixes null pointer dereference

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit c84ba07db4abd123b2ad93784e312a24d9341553)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=512c064cd9e064fccd5809bc0928822a7324373d
---

 libavformat/mux.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/mux.c b/libavformat/mux.c
index 789c811..f14bfd5 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;
     }
 



More information about the ffmpeg-cvslog mailing list