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

Sync with bridge changes in other plugins

parent c90be618
......@@ -129,7 +129,7 @@ static bridge_t *__GetBridge( vlc_object_t *p_object )
bridge_t *p_bridge;
vlc_value_t val;
if( var_Get( p_object->p_libvlc_global, "bridge-struct", &val ) )
if( var_Get( p_object->p_libvlc, "bridge-struct", &val ) )
{
p_bridge = NULL;
}
......@@ -169,8 +169,8 @@ static int OpenOut( vlc_object_t *p_this )
p_sys = malloc( sizeof( out_sout_stream_sys_t ) );
p_sys->b_inited = VLC_FALSE;
var_Create( p_this->p_libvlc_global, "bridge-lock", VLC_VAR_MUTEX );
var_Get( p_this->p_libvlc_global, "bridge-lock", &val );
var_Create( p_this->p_libvlc, "bridge-lock", VLC_VAR_MUTEX );
var_Get( p_this->p_libvlc, "bridge-lock", &val );
p_sys->p_lock = val.p_address;
var_Get( p_stream, SOUT_CFG_PREFIX_OUT "id", &val );
......@@ -218,14 +218,14 @@ static sout_stream_id_t * AddOut( sout_stream_t *p_stream, es_format_t *p_fmt )
p_bridge = GetBridge( p_stream );
if ( p_bridge == NULL )
{
vlc_object_t *p_libvlc_global = p_stream->p_libvlc_global;
vlc_object_t *p_libvlc = p_stream->p_libvlc;
vlc_value_t val;
p_bridge = malloc( sizeof( bridge_t ) );
var_Create( p_libvlc_global, "bridge-struct", VLC_VAR_ADDRESS );
var_Create( p_libvlc, "bridge-struct", VLC_VAR_ADDRESS );
val.p_address = p_bridge;
var_Set( p_libvlc_global, "bridge-struct", val );
var_Set( p_libvlc, "bridge-struct", val );
p_bridge->i_es_num = 0;
p_bridge->pp_es = NULL;
......@@ -354,8 +354,8 @@ static int OpenIn( vlc_object_t *p_this )
config_ChainParse( p_stream, SOUT_CFG_PREFIX_IN, ppsz_sout_options_in,
p_stream->p_cfg );
var_Create( p_this->p_libvlc_global, "bridge-lock", VLC_VAR_MUTEX );
var_Get( p_this->p_libvlc_global, "bridge-lock", &val );
var_Create( p_this->p_libvlc, "bridge-lock", VLC_VAR_MUTEX );
var_Get( p_this->p_libvlc, "bridge-lock", &val );
p_sys->p_lock = val.p_address;
var_Get( p_stream, SOUT_CFG_PREFIX_IN "id-offset", &val );
......@@ -519,12 +519,12 @@ static int SendIn( sout_stream_t *p_stream, sout_stream_id_t *id,
if( b_no_es )
{
vlc_object_t *p_libvlc_global = p_stream->p_libvlc_global;
vlc_object_t *p_libvlc = p_stream->p_libvlc;
for ( i = 0; i < p_bridge->i_es_num; i++ )
free( p_bridge->pp_es[i] );
free( p_bridge->pp_es );
free( p_bridge );
var_Destroy( p_libvlc_global, "bridge-struct" );
var_Destroy( p_libvlc, "bridge-struct" );
}
vlc_mutex_unlock( p_sys->p_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