X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fwall.c;h=39ddd82a10aca98efb5c12473c8fe9daff3001de;hb=fa61862474c332412e0341d98f1cf82c067d277a;hp=c5833bc67f85a39aae0ff29a7c24d48440f40a5a;hpb=00b95848260cd44f140a05da8aa5baf13580e2d3;p=vlc diff --git a/modules/video_filter/wall.c b/modules/video_filter/wall.c index c5833bc67f..39ddd82a10 100644 --- a/modules/video_filter/wall.c +++ b/modules/video_filter/wall.c @@ -266,8 +266,8 @@ static int Init( vout_thread_t *p_vout ) { msg_Warn( p_vout, "invalid aspect ratio specification" ); } - free( psz_aspect ); } + free( psz_aspect ); i_xpos = var_CreateGetInteger( p_vout, "video-x" ); i_ypos = var_CreateGetInteger( p_vout, "video-y" ); @@ -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_CloseAndRelease( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); } } }