summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dd06631)
+ use vout_Destroy where it should be)
It closes #1722.
+ 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 );
}
/* 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 );
}
/*****************************************************************************
}
/*****************************************************************************
{
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 );
}
free( p_vout->p_sys->pp_vout );
free( p_vout->p_sys );
}
--p_vout->p_sys->i_clones;
DEL_CALLBACKS( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones],
SendEvents );
--p_vout->p_sys->i_clones;
DEL_CALLBACKS( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones],
SendEvents );
- vlc_object_detach( 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] );
+ vout_Destroy( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones] );
- ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
-
- ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
-
#ifdef BEST_AUTOCROP
var_AddCallback( p_vout, "ratio-crop", FilterCallback, NULL );
#endif
#ifdef BEST_AUTOCROP
var_AddCallback( p_vout, "ratio-crop", FilterCallback, NULL );
#endif
+ ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
+
+ ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+
ADD_PARENT_CALLBACKS( SendEventsToChild );
return VLC_SUCCESS;
ADD_PARENT_CALLBACKS( SendEventsToChild );
return VLC_SUCCESS;
+ 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 */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
}
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
}
+
+ if( p_vout->p_sys->p_vout )
+ vout_Destroy( p_vout->p_sys->p_vout );
}
/*****************************************************************************
}
/*****************************************************************************
{
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 );
-
msg_Info( p_vout, "ratio %d", p_vout->p_sys->i_aspect / 432);
#endif
msg_Info( p_vout, "ratio %d", p_vout->p_sys->i_aspect / 432);
#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_height = fmt.i_visible_height = p_vout->p_sys->i_height;
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;
_("VLC could not open the video output module.") );
return VLC_EGENERIC;
}
_("VLC could not open the video output module.") );
return VLC_EGENERIC;
}
+ ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
p_vout->p_sys->b_changed = false;
p_vout->p_sys->i_lastchange = 0;
p_vout->p_sys->b_changed = false;
p_vout->p_sys->i_lastchange = 0;
+ 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 */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
}
if( p_vout->p_sys->p_vout )
}
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 );
+ vout_Destroy( p_vout->p_sys->p_vout );
}
/*****************************************************************************
}
/*****************************************************************************
}
/* We need to kill the old vout */
}
/* We need to kill the old 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 );
+ if( p_vout->p_sys->p_vout )
+ {
+ DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+ vout_Destroy( p_vout->p_sys->p_vout );
+ }
/* Try to open a new video output */
p_vout->p_sys->p_vout = SpawnRealVout( p_vout );
/* Try to open a new video output */
p_vout->p_sys->p_vout = SpawnRealVout( p_vout );
vout_sys_t *p_sys = p_vout->p_sys;
int i_index;
vout_sys_t *p_sys = p_vout->p_sys;
int i_index;
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
+ DEL_CALLBACKS( p_sys->p_vout, SendEvents );
+
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
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-x", MouseEvent, p_vout);
var_DelCallback( p_sys->p_vout, "mouse-y", MouseEvent, p_vout);
- DEL_CALLBACKS( p_sys->p_vout, SendEvents );
- vlc_object_detach( p_sys->p_vout );
- vlc_object_release( p_sys->p_vout );
+ vout_Destroy( p_sys->p_vout );
if( p_sys->p_blend->p_module )
module_Unneed( p_sys->p_blend, 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 );
vout_thread_t *p_vout = (vout_thread_t *)p_this;
vout_sys_t *p_sys = p_vout->p_sys;
vout_thread_t *p_vout = (vout_thread_t *)p_this;
vout_sys_t *p_sys = p_vout->p_sys;
- DEL_PARENT_CALLBACKS( SendEventsToChild );
FreeLogoList( p_sys->p_logo_list );
free( p_sys->p_logo_list );
FreeLogoList( p_sys->p_logo_list );
free( p_sys->p_logo_list );
+ 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 ; )
{
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
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);
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_Destroy( p_vout->p_sys->p_vout );
}
/*****************************************************************************
}
/*****************************************************************************
{
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 );
+ 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 ; )
{
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
p_vout->p_sys->p_opencv = NULL;
}
p_vout->p_sys->p_opencv = NULL;
}
+ vout_Destroy( p_vout->p_sys->p_vout )
}
/*****************************************************************************
}
/*****************************************************************************
{
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);
if( p_vout->p_sys->p_image )
ReleaseImages(p_vout);
if( p_vout->p_sys->p_image )
-#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 );
}
/* 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
}
/*****************************************************************************
}
/*****************************************************************************
{
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 );
free( p_vout->p_sys->pp_vout );
free( p_vout->p_sys );
DEL_CALLBACKS(
p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout,
SendEvents );
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 );
+ 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 ; )
{
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
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);
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_Destroy( p_vout->p_sys->p_vout );
}
#define SHUFFLE_WIDTH 81
}
#define SHUFFLE_WIDTH 81
{
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 );
free( p_vout->p_sys->pi_order );
image_HandlerDelete( p_vout->p_sys->p_image );
free( p_vout->p_sys->pi_order );
- DEL_PARENT_CALLBACKS( SendEventsToChild );
-
free( p_sys );
return VLC_EGENERIC;
}
free( p_sys );
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",
p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height,
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,
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_out.video.i_width != p_sys->fmt_out.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_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;
+ 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 ; )
{
i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
}
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
}
+
+ vout_Destroy( p_vout->p_sys->p_vout );
}
/*****************************************************************************
}
/*****************************************************************************
{
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 );
-
+ 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 );
}
/* 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 );
}
/*****************************************************************************
}
/*****************************************************************************
{
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 );
free( p_vout->p_sys->pp_vout );
free( p_vout->p_sys );
DEL_CALLBACKS(
p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout,
SendEvents );
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 );