Commit b54103b0 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

raw*: initialize callbacks only at success

Also remove dated comment.
parent 5987f34d
......@@ -103,9 +103,6 @@ static int Open( vlc_object_t * p_this )
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
/* Set p_input field */
p_demux->pf_demux = Demux;
p_demux->pf_control = Control;
p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
......@@ -210,6 +207,8 @@ static int Open( vlc_object_t * p_this )
p_sys->i_frame_size = p_sys->i_frame_samples * p_sys->i_seek_step;
msg_Dbg( p_demux, "frame size is %d bytes ", p_sys->i_frame_size);
p_demux->pf_demux = Demux;
p_demux->pf_control = Control;
return VLC_SUCCESS;
}
......
......@@ -194,9 +194,6 @@ static int Open( vlc_object_t * p_this )
p_peek += 72; /* skip rest of DIF block */
/* Set p_input field */
p_demux->pf_demux = Demux;
p_demux->pf_control = Control;
p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
......@@ -236,6 +233,8 @@ static int Open( vlc_object_t * p_this )
p_sys->p_es_audio = es_out_Add( p_demux->out, &p_sys->fmt_audio );
}
p_demux->pf_demux = Demux;
p_demux->pf_control = Control;
return VLC_SUCCESS;
}
......
......@@ -169,9 +169,6 @@ static int Open( vlc_object_t * p_this )
return VLC_EGENERIC;
}
valid:
/* Set p_input field */
p_demux->pf_demux = Demux;
p_demux->pf_control = Control;
p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
......@@ -388,6 +385,8 @@ valid:
* p_sys->fmt_video.video.i_bits_per_pixel / 8;
p_sys->p_es_video = es_out_Add( p_demux->out, &p_sys->fmt_video );
p_demux->pf_demux = Demux;
p_demux->pf_control = Control;
return VLC_SUCCESS;
error:
......
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