X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fvideo_output%2Fvout_subpictures.c;h=123d4da3e18856a9d6149eeb0ddc8c1931586329;hb=4b9c63a36eded246ad9ef1ea0de0cf7b38d29ad9;hp=ee608b907e6ca3da2505340ade3a54cfe4ca0659;hpb=37a27cc6447a51b5780adf0917ab7b22a4456a5b;p=vlc diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c index ee608b907e..123d4da3e1 100644 --- a/src/video_output/vout_subpictures.c +++ b/src/video_output/vout_subpictures.c @@ -274,14 +274,8 @@ void spu_Destroy( spu_t *p_spu ) * \param p_this the object in which to destroy the subpicture unit * \param b_attach to select attach or detach */ -void spu_Attach( spu_t *p_spu, vlc_object_t *p_this, bool b_attach ) +void spu_Attach( spu_t *p_spu, vlc_object_t *p_input, bool b_attach ) { - vlc_object_t *p_input; - - p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_PARENT ); - if( !p_input ) - return; - if( b_attach ) { UpdateSPU( p_spu, VLC_OBJECT(p_input) ); @@ -292,8 +286,6 @@ void spu_Attach( spu_t *p_spu, vlc_object_t *p_this, bool b_attach ) vlc_mutex_lock( &p_spu->p->lock ); p_spu->p->i_margin = var_GetInteger( p_input, "sub-margin" ); vlc_mutex_unlock( &p_spu->p->lock ); - - vlc_object_release( p_input ); } else { @@ -301,7 +293,6 @@ void spu_Attach( spu_t *p_spu, vlc_object_t *p_this, bool b_attach ) var_DelCallback( p_input, "sub-margin", MarginCallback, p_spu->p ); var_DelCallback( p_input, "highlight", CropCallback, p_spu ); var_Destroy( p_input, "highlight" ); - vlc_object_release( p_input ); } }