]> git.sesse.net Git - vlc/commitdiff
avformat/mux.c: Check malloc return value.
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Tue, 24 Apr 2012 08:45:10 +0000 (10:45 +0200)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Wed, 2 May 2012 14:30:56 +0000 (16:30 +0200)
modules/demux/avformat/mux.c

index 5d0605917918fb7a33178892ab47ef08aa5adef7..9ce5af0d694d7dd37ce487c1e55cd40922c22a46 100644 (file)
@@ -128,6 +128,8 @@ int OpenMux( vlc_object_t *p_this )
     p_mux->pf_delstream = DelStream;
     p_mux->pf_mux       = Mux;
     p_mux->p_sys = p_sys = malloc( sizeof( sout_mux_sys_t ) );
+    if( !p_sys )
+        return VLC_ENOMEM;
 
     p_sys->oc = avformat_alloc_context();
     p_sys->oc->oformat = file_oformat;