Commit 2c5ecf11 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.

(cherry picked from commit fdb9f79e5ffdb566a1b5f5940d83f8cd93f08783)

Conflicts:
	src/input/input.c
parent ed203d93
...@@ -1177,7 +1177,6 @@ static void InitPrograms( input_thread_t * p_input ) ...@@ -1177,7 +1177,6 @@ static void InitPrograms( input_thread_t * p_input )
static int Init( input_thread_t * p_input ) static int Init( input_thread_t * p_input )
{ {
vlc_meta_t *p_meta;
int i; int i;
for( i = 0; i < p_input->p->p_item->i_options; i++ ) for( i = 0; i < p_input->p->p_item->i_options; i++ )
...@@ -1258,8 +1257,8 @@ static int Init( input_thread_t * p_input ) ...@@ -1258,8 +1257,8 @@ static int Init( input_thread_t * p_input )
p_input->p->b_out_pace_control ? "async" : "sync" ); p_input->p->b_out_pace_control ? "async" : "sync" );
} }
p_meta = vlc_meta_New(); vlc_meta_t *p_meta = vlc_meta_New();
if( p_meta ) if( p_meta != NULL )
{ {
/* Get meta data from users */ /* Get meta data from users */
InputMetaUser( p_input, p_meta ); InputMetaUser( p_input, p_meta );
...@@ -1271,8 +1270,8 @@ static int Init( input_thread_t * p_input ) ...@@ -1271,8 +1270,8 @@ static int Init( input_thread_t * p_input )
for( int i = 0; i < p_input->p->i_slave; i++ ) for( int i = 0; i < p_input->p->i_slave; i++ )
InputSourceMeta( p_input, p_input->p->slave[i], p_meta ); InputSourceMeta( p_input, p_input->p->slave[i], p_meta );
/* */ es_out_ControlSetMeta( p_input->p->p_es_out, p_meta );
InputUpdateMeta( p_input, p_meta ); vlc_meta_Delete( p_meta );
} }
msg_Dbg( p_input, "`%s' successfully opened", 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