Commit 85078e25 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Fix a segmentation fault introduced by the previous commit

parent 03e270d0
...@@ -429,6 +429,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -429,6 +429,8 @@ static int Open( vlc_object_t *p_this )
return VLC_EGENERIC; 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; p_sys->i_packet_size = i_packet_size;
/* Fill dump mode fields */ /* Fill dump mode fields */
...@@ -485,8 +487,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -485,8 +487,6 @@ static int Open( vlc_object_t *p_this )
else else
p_demux->pf_demux = Demux; p_demux->pf_demux = Demux;
p_demux->pf_control = Control; 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 */ /* Init p_sys field */
p_sys->b_meta = VLC_TRUE; p_sys->b_meta = VLC_TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment