X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fwall.c;h=aeec730bdc30289a3b511113f96f31b2238f1a74;hb=3f35c5171d9181434ebb16ffbdec7f7d62c28b8d;hp=c5833bc67f85a39aae0ff29a7c24d48440f40a5a;hpb=dd066314d5dde1a5d828d2c51c0296dd7b04bac7;p=vlc diff --git a/modules/video_filter/wall.c b/modules/video_filter/wall.c index c5833bc67f..aeec730bdc 100644 --- a/modules/video_filter/wall.c +++ b/modules/video_filter/wall.c @@ -451,12 +451,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 ); } /***************************************************************************** @@ -468,9 +472,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 ); @@ -583,10 +584,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) DEL_CALLBACKS( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout, SendEvents ); - vlc_object_detach( - p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); - vlc_object_release( - p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); + vout_Destroy( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); } } }