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

decoder: initialize callbacks data before probing the module

This fixes aout_update_format and vout_update_format.
parent 4b3cb044
...@@ -1511,6 +1511,23 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent, ...@@ -1511,6 +1511,23 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
p_owner->p_sout_input = NULL; p_owner->p_sout_input = NULL;
p_owner->p_packetizer = NULL; p_owner->p_packetizer = NULL;
p_owner->b_packetizer = b_packetizer; p_owner->b_packetizer = b_packetizer;
p_owner->b_fmt_description = false;
p_owner->p_description = NULL;
p_owner->b_paused = false;
p_owner->pause.i_date = VLC_TS_INVALID;
p_owner->pause.i_ignore = 0;
p_owner->b_waiting = false;
p_owner->b_first = true;
p_owner->b_has_data = false;
p_owner->b_flushing = false;
p_owner->b_draining = false;
p_owner->b_drained = false;
p_owner->b_idle = false;
es_format_Init( &p_owner->fmt, UNKNOWN_ES, 0 ); es_format_Init( &p_owner->fmt, UNKNOWN_ES, 0 );
/* decoder fifo */ /* decoder fifo */
...@@ -1522,6 +1539,11 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent, ...@@ -1522,6 +1539,11 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
return NULL; return NULL;
} }
vlc_mutex_init( &p_owner->lock );
vlc_cond_init( &p_owner->wait_request );
vlc_cond_init( &p_owner->wait_acknowledge );
vlc_cond_init( &p_owner->wait_fifo );
/* Set buffers allocation callbacks for the decoders */ /* Set buffers allocation callbacks for the decoders */
p_dec->pf_aout_format_update = aout_update_format; p_dec->pf_aout_format_update = aout_update_format;
p_dec->pf_vout_format_update = vout_update_format; p_dec->pf_vout_format_update = vout_update_format;
...@@ -1583,28 +1605,6 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent, ...@@ -1583,28 +1605,6 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
} }
} }
/* */
vlc_mutex_init( &p_owner->lock );
vlc_cond_init( &p_owner->wait_request );
vlc_cond_init( &p_owner->wait_acknowledge );
vlc_cond_init( &p_owner->wait_fifo );
p_owner->b_fmt_description = false;
p_owner->p_description = NULL;
p_owner->b_paused = false;
p_owner->pause.i_date = VLC_TS_INVALID;
p_owner->pause.i_ignore = 0;
p_owner->b_waiting = false;
p_owner->b_first = true;
p_owner->b_has_data = false;
p_owner->b_flushing = false;
p_owner->b_draining = false;
p_owner->b_drained = false;
p_owner->b_idle = false;
/* */ /* */
p_owner->cc.b_supported = false; p_owner->cc.b_supported = false;
if( !b_packetizer ) if( !b_packetizer )
......
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