]> git.sesse.net Git - vlc/commitdiff
Fix a segmentation fault introduced by the previous commit
authorJean-Paul Saman <jpsaman@videolan.org>
Mon, 8 Aug 2005 09:44:42 +0000 (09:44 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Mon, 8 Aug 2005 09:44:42 +0000 (09:44 +0000)
modules/demux/ts.c

index 8a1ca984b5b241b00790141ec6848a76c9a569f2..1898140e9c5237f0834ed09a14c8f3199233aa8d 100644 (file)
@@ -429,6 +429,8 @@ static int Open( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
+    p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
+    memset( p_sys, 0, sizeof( demux_sys_t ) );
     p_sys->i_packet_size = i_packet_size;
 
     /* Fill dump mode fields */
@@ -485,8 +487,6 @@ static int Open( vlc_object_t *p_this )
     else
         p_demux->pf_demux = Demux;
     p_demux->pf_control = Control;
-    p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
-    memset( p_sys, 0, sizeof( demux_sys_t ) );
 
     /* Init p_sys field */
     p_sys->b_meta = VLC_TRUE;