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

input: fetch demux attachment once, not twice (fixes #11966)

This was inefficient and caused attachments from the meta engine or from
the slave demuxers to get lost.

Note that those attachments will still get lost later if the master
demuxer sets the metadata update flag (which affects the Ogg demuxer
only so far), or when adding a slave input.

All regressions introduced in e4673369.
parent 39c98427
......@@ -1173,8 +1173,6 @@ static void InitPrograms( input_thread_t * p_input )
static int Init( input_thread_t * p_input )
{
vlc_meta_t *p_meta;
for( int i = 0; i < p_input->p->p_item->i_options; i++ )
{
if( !strncmp( p_input->p->p_item->ppsz_options[i], "meta-file", 9 ) )
......@@ -1253,8 +1251,8 @@ static int Init( input_thread_t * p_input )
p_input->p->b_out_pace_control ? "async" : "sync" );
}
p_meta = vlc_meta_New();
if( p_meta )
vlc_meta_t *p_meta = vlc_meta_New();
if( p_meta != NULL )
{
/* Get meta data from users */
InputMetaUser( p_input, p_meta );
......@@ -1266,8 +1264,8 @@ static int Init( input_thread_t * p_input )
for( int i = 0; i < p_input->p->i_slave; i++ )
InputSourceMeta( p_input, p_input->p->slave[i], p_meta );
/* */
InputUpdateMeta( p_input, p_meta );
es_out_ControlSetMeta( p_input->p->p_es_out, p_meta );
vlc_meta_Delete( p_meta );
}
msg_Dbg( p_input, "`%s' successfully opened",
......
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