X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fpuzzle.c;h=9d0455c55767913590ca6462fbe6794aa8860acf;hb=688f0a8d8913f20ac5d3e27bf4f2bbe35c9f5de7;hp=5f4fc1882ee3e8545aedf76f986a654ba84b837a;hpb=42bb236284b09355d8bfde47fb4915dd1f07aa68;p=vlc diff --git a/modules/video_filter/puzzle.c b/modules/video_filter/puzzle.c index 5f4fc1882e..9d0455c557 100644 --- a/modules/video_filter/puzzle.c +++ b/modules/video_filter/puzzle.c @@ -289,6 +289,10 @@ static void End( vout_thread_t *p_vout ) { int i_index; + DEL_PARENT_CALLBACKS( SendEventsToChild ); + + DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents ); + /* Free the fake output buffers we allocated */ for( i_index = I_OUTPUTPICTURES ; i_index ; ) { @@ -299,6 +303,8 @@ static void End( vout_thread_t *p_vout ) var_DelCallback( p_vout->p_sys->p_vout, "mouse-x", MouseEvent, p_vout); var_DelCallback( p_vout->p_sys->p_vout, "mouse-y", MouseEvent, p_vout); var_DelCallback( p_vout->p_sys->p_vout, "mouse-clicked", MouseEvent, p_vout); + + vout_CloseAndRelease( p_vout->p_sys->p_vout ); } #define SHUFFLE_WIDTH 81 @@ -327,18 +333,9 @@ static void Destroy( vlc_object_t *p_this ) { vout_thread_t *p_vout = (vout_thread_t *)p_this; - if( p_vout->p_sys->p_vout ) - { - 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 ); - } - image_HandlerDelete( p_vout->p_sys->p_image ); free( p_vout->p_sys->pi_order ); - DEL_PARENT_CALLBACKS( SendEventsToChild ); - free( p_vout->p_sys ); } @@ -362,7 +359,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic ) while( ( p_outpic = vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 ) ) == NULL ) { - if( p_vout->b_die || p_vout->b_error ) + if( !vlc_object_alive (p_vout) || p_vout->b_error ) { return; }