X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fpanoramix.c;h=eda2d7f07092737e780aed0b7fa0ccb4450487c9;hb=3f35c5171d9181434ebb16ffbdec7f7d62c28b8d;hp=91a067ff603763fa9aa26ec4cb4e918c3b1e45d7;hpb=dd066314d5dde1a5d828d2c51c0296dd7b04bac7;p=vlc diff --git a/modules/video_filter/panoramix.c b/modules/video_filter/panoramix.c index 91a067ff60..eda2d7f070 100644 --- a/modules/video_filter/panoramix.c +++ b/modules/video_filter/panoramix.c @@ -873,15 +873,20 @@ static void End( vout_thread_t *p_vout ) { int i_index; -#ifdef OVERLAP - var_SetInteger( p_vout, "bz-length", p_vout->p_sys->bz_length); -#endif + 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 ); + +#ifdef OVERLAP + var_SetInteger( p_vout, "bz-length", p_vout->p_sys->bz_length); +#endif } /***************************************************************************** @@ -893,16 +898,6 @@ static void Destroy( vlc_object_t *p_this ) { vout_thread_t *p_vout = (vout_thread_t *)p_this; -#ifdef GLOBAL_OUTPUT - DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents); - vlc_object_detach( p_vout->p_sys->p_vout ); - vlc_object_release( p_vout->p_sys->p_vout ); - DEL_PARENT_CALLBACKS( SendEventsToChild); -#endif - - RemoveAllVout( p_vout ); - DEL_PARENT_CALLBACKS( SendEventsToChild ); - free( p_vout->p_sys->pp_vout ); free( p_vout->p_sys ); @@ -1908,10 +1903,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 ); } } }