X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fclone.c;h=368f7d5b8b58403847e94b448fa5997a1ba20e1a;hb=3f35c5171d9181434ebb16ffbdec7f7d62c28b8d;hp=3b558d3b1825731414f3fe57200a6bac419e8970;hpb=dd066314d5dde1a5d828d2c51c0296dd7b04bac7;p=vlc diff --git a/modules/video_filter/clone.c b/modules/video_filter/clone.c index 3b558d3b18..368f7d5b8b 100644 --- a/modules/video_filter/clone.c +++ b/modules/video_filter/clone.c @@ -285,12 +285,16 @@ static void End( vout_thread_t *p_vout ) { int i_index; + DEL_PARENT_CALLBACKS( SendEventsToChild ); + /* Free the fake output buffers we allocated */ for( i_index = I_OUTPUTPICTURES ; i_index ; ) { i_index--; free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig ); } + + RemoveAllVout( p_vout ); } /***************************************************************************** @@ -302,10 +306,6 @@ static void Destroy( vlc_object_t *p_this ) { vout_thread_t *p_vout = (vout_thread_t *)p_this; - RemoveAllVout( p_vout ); - - DEL_PARENT_CALLBACKS( SendEventsToChild ); - free( p_vout->p_sys->pp_vout ); free( p_vout->p_sys ); } @@ -387,8 +387,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) --p_vout->p_sys->i_clones; DEL_CALLBACKS( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones], SendEvents ); - vlc_object_detach( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones] ); - vlc_object_release( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones] ); + vout_Destroy( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones] ); } }