Commit 3f35c517 authored by Laurent Aimar's avatar Laurent Aimar

Fixed filters implemented as vout (Init/End can be called multiple times

+ use vout_Destroy where it should be)
It closes #1722.
parent dd066314
...@@ -285,12 +285,16 @@ static void End( vout_thread_t *p_vout ) ...@@ -285,12 +285,16 @@ static void End( vout_thread_t *p_vout )
{ {
int i_index; int i_index;
DEL_PARENT_CALLBACKS( SendEventsToChild );
/* Free the fake output buffers we allocated */ /* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; ) for( i_index = I_OUTPUTPICTURES ; i_index ; )
{ {
i_index--; i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig ); free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
} }
RemoveAllVout( p_vout );
} }
/***************************************************************************** /*****************************************************************************
...@@ -302,10 +306,6 @@ static void Destroy( vlc_object_t *p_this ) ...@@ -302,10 +306,6 @@ static void Destroy( vlc_object_t *p_this )
{ {
vout_thread_t *p_vout = (vout_thread_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->pp_vout );
free( p_vout->p_sys ); free( p_vout->p_sys );
} }
...@@ -387,8 +387,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) ...@@ -387,8 +387,7 @@ static void RemoveAllVout( vout_thread_t *p_vout )
--p_vout->p_sys->i_clones; --p_vout->p_sys->i_clones;
DEL_CALLBACKS( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones], DEL_CALLBACKS( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones],
SendEvents ); SendEvents );
vlc_object_detach( 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] );
vlc_object_release( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones] );
} }
} }
......
...@@ -380,14 +380,14 @@ static int Init( vout_thread_t *p_vout ) ...@@ -380,14 +380,14 @@ static int Init( vout_thread_t *p_vout )
return VLC_EGENERIC; return VLC_EGENERIC;
} }
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
#ifdef BEST_AUTOCROP #ifdef BEST_AUTOCROP
var_AddCallback( p_vout, "ratio-crop", FilterCallback, NULL ); var_AddCallback( p_vout, "ratio-crop", FilterCallback, NULL );
#endif #endif
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
ADD_PARENT_CALLBACKS( SendEventsToChild ); ADD_PARENT_CALLBACKS( SendEventsToChild );
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -400,12 +400,19 @@ static void End( vout_thread_t *p_vout ) ...@@ -400,12 +400,19 @@ static void End( vout_thread_t *p_vout )
{ {
int i_index; int i_index;
DEL_PARENT_CALLBACKS( SendEventsToChild );
if( p_vout->p_sys->p_vout )
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
/* Free the fake output buffers we allocated */ /* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; ) for( i_index = I_OUTPUTPICTURES ; i_index ; )
{ {
i_index--; i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig ); free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
} }
if( p_vout->p_sys->p_vout )
vout_Destroy( p_vout->p_sys->p_vout );
} }
/***************************************************************************** /*****************************************************************************
...@@ -417,15 +424,6 @@ static void Destroy( vlc_object_t *p_this ) ...@@ -417,15 +424,6 @@ static void Destroy( vlc_object_t *p_this )
{ {
vout_thread_t *p_vout = (vout_thread_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 );
}
DEL_PARENT_CALLBACKS( SendEventsToChild );
free( p_vout->p_sys ); free( p_vout->p_sys );
} }
...@@ -455,7 +453,11 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -455,7 +453,11 @@ static int Manage( vout_thread_t *p_vout )
msg_Info( p_vout, "ratio %d", p_vout->p_sys->i_aspect / 432); msg_Info( p_vout, "ratio %d", p_vout->p_sys->i_aspect / 432);
#endif #endif
vlc_object_release( p_vout->p_sys->p_vout ); if( p_vout->p_sys->p_vout )
{
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vout_Destroy( p_vout->p_sys->p_vout );
}
fmt.i_width = fmt.i_visible_width = p_vout->p_sys->i_width; fmt.i_width = fmt.i_visible_width = p_vout->p_sys->i_width;
fmt.i_height = fmt.i_visible_height = p_vout->p_sys->i_height; fmt.i_height = fmt.i_visible_height = p_vout->p_sys->i_height;
...@@ -473,6 +475,7 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -473,6 +475,7 @@ static int Manage( vout_thread_t *p_vout )
_("VLC could not open the video output module.") ); _("VLC could not open the video output module.") );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
p_vout->p_sys->b_changed = false; p_vout->p_sys->b_changed = false;
p_vout->p_sys->i_lastchange = 0; p_vout->p_sys->i_lastchange = 0;
......
...@@ -420,6 +420,11 @@ static void End( vout_thread_t *p_vout ) ...@@ -420,6 +420,11 @@ static void End( vout_thread_t *p_vout )
{ {
int i_index; int i_index;
DEL_PARENT_CALLBACKS( SendEventsToChild );
if( p_vout->p_sys->p_vout )
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
/* Free the fake output buffers we allocated */ /* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; ) for( i_index = I_OUTPUTPICTURES ; i_index ; )
{ {
...@@ -428,13 +433,7 @@ static void End( vout_thread_t *p_vout ) ...@@ -428,13 +433,7 @@ static void End( vout_thread_t *p_vout )
} }
if( p_vout->p_sys->p_vout ) if( p_vout->p_sys->p_vout )
{ vout_Destroy( 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 );
}
DEL_PARENT_CALLBACKS( SendEventsToChild );
} }
/***************************************************************************** /*****************************************************************************
...@@ -2061,11 +2060,11 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -2061,11 +2060,11 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd,
} }
/* We need to kill the old vout */ /* We need to kill the old vout */
if( p_vout->p_sys->p_vout )
{
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents ); DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
vout_Destroy( p_vout->p_sys->p_vout );
vlc_object_detach( p_vout->p_sys->p_vout ); }
vlc_object_release( p_vout->p_sys->p_vout );
/* Try to open a new video output */ /* Try to open a new video output */
p_vout->p_sys->p_vout = SpawnRealVout( p_vout ); p_vout->p_sys->p_vout = SpawnRealVout( p_vout );
......
...@@ -475,6 +475,10 @@ static void End( vout_thread_t *p_vout ) ...@@ -475,6 +475,10 @@ static void End( vout_thread_t *p_vout )
vout_sys_t *p_sys = p_vout->p_sys; vout_sys_t *p_sys = p_vout->p_sys;
int i_index; int i_index;
DEL_PARENT_CALLBACKS( SendEventsToChild );
DEL_CALLBACKS( p_sys->p_vout, SendEvents );
/* Free the fake output buffers we allocated */ /* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; ) for( i_index = I_OUTPUTPICTURES ; i_index ; )
{ {
...@@ -485,9 +489,7 @@ static void End( vout_thread_t *p_vout ) ...@@ -485,9 +489,7 @@ static void End( vout_thread_t *p_vout )
var_DelCallback( p_sys->p_vout, "mouse-x", MouseEvent, p_vout); var_DelCallback( p_sys->p_vout, "mouse-x", MouseEvent, p_vout);
var_DelCallback( p_sys->p_vout, "mouse-y", MouseEvent, p_vout); var_DelCallback( p_sys->p_vout, "mouse-y", MouseEvent, p_vout);
DEL_CALLBACKS( p_sys->p_vout, SendEvents ); vout_Destroy( p_sys->p_vout );
vlc_object_detach( p_sys->p_vout );
vlc_object_release( p_sys->p_vout );
if( p_sys->p_blend->p_module ) if( p_sys->p_blend->p_module )
module_Unneed( p_sys->p_blend, p_sys->p_blend->p_module ); module_Unneed( p_sys->p_blend, p_sys->p_blend->p_module );
...@@ -503,7 +505,6 @@ static void Destroy( vlc_object_t *p_this ) ...@@ -503,7 +505,6 @@ static void Destroy( vlc_object_t *p_this )
vout_thread_t *p_vout = (vout_thread_t *)p_this; vout_thread_t *p_vout = (vout_thread_t *)p_this;
vout_sys_t *p_sys = p_vout->p_sys; vout_sys_t *p_sys = p_vout->p_sys;
DEL_PARENT_CALLBACKS( SendEventsToChild );
FreeLogoList( p_sys->p_logo_list ); FreeLogoList( p_sys->p_logo_list );
free( p_sys->p_logo_list ); free( p_sys->p_logo_list );
......
...@@ -186,6 +186,10 @@ static void End( vout_thread_t *p_vout ) ...@@ -186,6 +186,10 @@ static void End( vout_thread_t *p_vout )
{ {
int i_index; int i_index;
DEL_PARENT_CALLBACKS( SendEventsToChild );
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
/* Free the fake output buffers we allocated */ /* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; ) for( i_index = I_OUTPUTPICTURES ; i_index ; )
{ {
...@@ -196,6 +200,8 @@ static void End( vout_thread_t *p_vout ) ...@@ -196,6 +200,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-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-y", MouseEvent, p_vout);
var_DelCallback( p_vout->p_sys->p_vout, "mouse-clicked", MouseEvent, p_vout); var_DelCallback( p_vout->p_sys->p_vout, "mouse-clicked", MouseEvent, p_vout);
vout_Destroy( p_vout->p_sys->p_vout );
} }
/***************************************************************************** /*****************************************************************************
...@@ -205,16 +211,8 @@ static void Destroy( vlc_object_t *p_this ) ...@@ -205,16 +211,8 @@ static void Destroy( vlc_object_t *p_this )
{ {
vout_thread_t *p_vout = (vout_thread_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 ); image_HandlerDelete( p_vout->p_sys->p_image );
DEL_PARENT_CALLBACKS( SendEventsToChild );
free( p_vout->p_sys ); free( p_vout->p_sys );
} }
......
...@@ -374,6 +374,10 @@ static void End( vout_thread_t *p_vout ) ...@@ -374,6 +374,10 @@ static void End( vout_thread_t *p_vout )
{ {
int i_index; int i_index;
DEL_PARENT_CALLBACKS( SendEventsToChild );
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
/* Free the fake output buffers we allocated */ /* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; ) for( i_index = I_OUTPUTPICTURES ; i_index ; )
{ {
...@@ -391,6 +395,7 @@ static void End( vout_thread_t *p_vout ) ...@@ -391,6 +395,7 @@ static void End( vout_thread_t *p_vout )
p_vout->p_sys->p_opencv = NULL; p_vout->p_sys->p_opencv = NULL;
} }
vout_Destroy( p_vout->p_sys->p_vout )
} }
/***************************************************************************** /*****************************************************************************
...@@ -402,15 +407,6 @@ static void Destroy( vlc_object_t *p_this ) ...@@ -402,15 +407,6 @@ static void Destroy( vlc_object_t *p_this )
{ {
vout_thread_t *p_vout = (vout_thread_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 );
}
DEL_PARENT_CALLBACKS( SendEventsToChild );
ReleaseImages(p_vout); ReleaseImages(p_vout);
if( p_vout->p_sys->p_image ) if( p_vout->p_sys->p_image )
......
...@@ -873,15 +873,20 @@ static void End( vout_thread_t *p_vout ) ...@@ -873,15 +873,20 @@ static void End( vout_thread_t *p_vout )
{ {
int i_index; int i_index;
#ifdef OVERLAP DEL_PARENT_CALLBACKS( SendEventsToChild );
var_SetInteger( p_vout, "bz-length", p_vout->p_sys->bz_length);
#endif
/* Free the fake output buffers we allocated */ /* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; ) for( i_index = I_OUTPUTPICTURES ; i_index ; )
{ {
i_index--; i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig ); 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 ) ...@@ -893,16 +898,6 @@ static void Destroy( vlc_object_t *p_this )
{ {
vout_thread_t *p_vout = (vout_thread_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->pp_vout );
free( p_vout->p_sys ); free( p_vout->p_sys );
...@@ -1908,10 +1903,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) ...@@ -1908,10 +1903,7 @@ static void RemoveAllVout( vout_thread_t *p_vout )
DEL_CALLBACKS( DEL_CALLBACKS(
p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout, p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout,
SendEvents ); SendEvents );
vlc_object_detach( vout_Destroy( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout );
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 );
} }
} }
} }
......
...@@ -289,6 +289,10 @@ static void End( vout_thread_t *p_vout ) ...@@ -289,6 +289,10 @@ static void End( vout_thread_t *p_vout )
{ {
int i_index; int i_index;
DEL_PARENT_CALLBACKS( SendEventsToChild );
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
/* Free the fake output buffers we allocated */ /* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; ) for( i_index = I_OUTPUTPICTURES ; i_index ; )
{ {
...@@ -299,6 +303,8 @@ static void End( vout_thread_t *p_vout ) ...@@ -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-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-y", MouseEvent, p_vout);
var_DelCallback( p_vout->p_sys->p_vout, "mouse-clicked", MouseEvent, p_vout); var_DelCallback( p_vout->p_sys->p_vout, "mouse-clicked", MouseEvent, p_vout);
vout_Destroy( p_vout->p_sys->p_vout );
} }
#define SHUFFLE_WIDTH 81 #define SHUFFLE_WIDTH 81
...@@ -327,18 +333,9 @@ static void Destroy( vlc_object_t *p_this ) ...@@ -327,18 +333,9 @@ static void Destroy( vlc_object_t *p_this )
{ {
vout_thread_t *p_vout = (vout_thread_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 ); image_HandlerDelete( p_vout->p_sys->p_image );
free( p_vout->p_sys->pi_order ); free( p_vout->p_sys->pi_order );
DEL_PARENT_CALLBACKS( SendEventsToChild );
free( p_vout->p_sys ); free( p_vout->p_sys );
} }
......
...@@ -191,6 +191,8 @@ static int OpenScaler( vlc_object_t *p_this ) ...@@ -191,6 +191,8 @@ static int OpenScaler( vlc_object_t *p_this )
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
if( p_sys->ctx ) sws_freeContext( p_sys->ctx );
p_sys->ctx = NULL;
msg_Dbg( p_filter, "%ix%i chroma: %4.4s -> %ix%i chroma: %4.4s", msg_Dbg( p_filter, "%ix%i chroma: %4.4s -> %ix%i chroma: %4.4s",
p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height, p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height,
...@@ -231,7 +233,8 @@ static int CheckInit( filter_t *p_filter ) ...@@ -231,7 +233,8 @@ static int CheckInit( filter_t *p_filter )
if( ( p_filter->fmt_in.video.i_width != p_sys->fmt_in.video.i_width ) || if( ( p_filter->fmt_in.video.i_width != p_sys->fmt_in.video.i_width ) ||
( p_filter->fmt_in.video.i_height != p_sys->fmt_in.video.i_height ) || ( p_filter->fmt_in.video.i_height != p_sys->fmt_in.video.i_height ) ||
( p_filter->fmt_out.video.i_width != p_sys->fmt_out.video.i_width ) || ( p_filter->fmt_out.video.i_width != p_sys->fmt_out.video.i_width ) ||
( p_filter->fmt_out.video.i_height != p_sys->fmt_out.video.i_height ) ) ( p_filter->fmt_out.video.i_height != p_sys->fmt_out.video.i_height ) ||
!p_sys->ctx )
{ {
int i_fmt_in, i_fmt_out; int i_fmt_in, i_fmt_out;
......
...@@ -276,12 +276,18 @@ static void End( vout_thread_t *p_vout ) ...@@ -276,12 +276,18 @@ static void End( vout_thread_t *p_vout )
{ {
int i_index; int i_index;
DEL_PARENT_CALLBACKS( SendEventsToChild );
DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
/* Free the fake output buffers we allocated */ /* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; ) for( i_index = I_OUTPUTPICTURES ; i_index ; )
{ {
i_index--; i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig ); free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
} }
vout_Destroy( p_vout->p_sys->p_vout );
} }
/***************************************************************************** /*****************************************************************************
...@@ -293,15 +299,6 @@ static void Destroy( vlc_object_t *p_this ) ...@@ -293,15 +299,6 @@ static void Destroy( vlc_object_t *p_this )
{ {
vout_thread_t *p_vout = (vout_thread_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 );
}
DEL_PARENT_CALLBACKS( SendEventsToChild );
free( p_vout->p_sys ); free( p_vout->p_sys );
} }
......
...@@ -451,12 +451,16 @@ static void End( vout_thread_t *p_vout ) ...@@ -451,12 +451,16 @@ static void End( vout_thread_t *p_vout )
{ {
int i_index; int i_index;
DEL_PARENT_CALLBACKS( SendEventsToChild );
/* Free the fake output buffers we allocated */ /* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; ) for( i_index = I_OUTPUTPICTURES ; i_index ; )
{ {
i_index--; i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig ); free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
} }
RemoveAllVout( p_vout );
} }
/***************************************************************************** /*****************************************************************************
...@@ -468,9 +472,6 @@ static void Destroy( vlc_object_t *p_this ) ...@@ -468,9 +472,6 @@ static void Destroy( vlc_object_t *p_this )
{ {
vout_thread_t *p_vout = (vout_thread_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->pp_vout );
free( p_vout->p_sys ); free( p_vout->p_sys );
...@@ -583,10 +584,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) ...@@ -583,10 +584,7 @@ static void RemoveAllVout( vout_thread_t *p_vout )
DEL_CALLBACKS( DEL_CALLBACKS(
p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout, p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout,
SendEvents ); SendEvents );
vlc_object_detach( vout_Destroy( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout );
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 );
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment