Commit 09ba73c7 authored by Laurent Aimar's avatar Laurent Aimar

* input, stream_output: handle sout_instance_t->p_meta.

parent 0afa4317
...@@ -899,8 +899,15 @@ static int InitThread( input_thread_t * p_input ) ...@@ -899,8 +899,15 @@ static int InitThread( input_thread_t * p_input )
} }
if( p_playlist ) vlc_object_release( p_playlist ); if( p_playlist ) vlc_object_release( p_playlist );
if( p_input->stream.p_sout && p_input->stream.p_sout->p_meta == NULL )
{
p_input->stream.p_sout->p_meta = meta;
}
else
{
vlc_meta_Delete( meta ); vlc_meta_Delete( meta );
} }
}
/* get length */ /* get length */
if( !demux_Control( p_input, DEMUX_GET_LENGTH, &i_length ) && i_length > 0 ) if( !demux_Control( p_input, DEMUX_GET_LENGTH, &i_length ) && i_length > 0 )
......
...@@ -31,8 +31,10 @@ ...@@ -31,8 +31,10 @@
#include <string.h> /* strerror() */ #include <string.h> /* strerror() */
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/sout.h> #include <vlc/sout.h>
#include "vlc_meta.h"
#undef DEBUG_BUFFER #undef DEBUG_BUFFER
/***************************************************************************** /*****************************************************************************
* Local prototypes * Local prototypes
...@@ -117,6 +119,7 @@ sout_instance_t * __sout_NewInstance ( vlc_object_t *p_parent, ...@@ -117,6 +119,7 @@ sout_instance_t * __sout_NewInstance ( vlc_object_t *p_parent,
/* *** init descriptor *** */ /* *** init descriptor *** */
p_sout->psz_sout = strdup( psz_dest ); p_sout->psz_sout = strdup( psz_dest );
p_sout->p_meta = NULL;
p_sout->i_preheader = 0; p_sout->i_preheader = 0;
p_sout->i_padding = 0; p_sout->i_padding = 0;
p_sout->i_out_pace_nocontrol = 0; p_sout->i_out_pace_nocontrol = 0;
...@@ -162,6 +165,11 @@ void sout_DeleteInstance( sout_instance_t * p_sout ) ...@@ -162,6 +165,11 @@ void sout_DeleteInstance( sout_instance_t * p_sout )
FREE( p_sout->psz_sout ); FREE( p_sout->psz_sout );
FREE( p_sout->psz_chain ); FREE( p_sout->psz_chain );
if( p_sout->p_meta )
{
vlc_meta_Delete( p_sout->p_meta );
}
sout_stream_delete( p_sout->p_stream ); sout_stream_delete( p_sout->p_stream );
vlc_mutex_destroy( &p_sout->lock ); vlc_mutex_destroy( &p_sout->lock );
......
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