/* Allocate structure */
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
- {
- msg_Err( p_vout, "out of memory" );
return VLC_ENOMEM;
- }
p_vout->p_sys->p_image = image_HandlerCreate( 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 ; )
{
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 );
}
/*****************************************************************************
{
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 );
- DEL_PARENT_CALLBACKS( SendEventsToChild );
free( p_vout->p_sys );
}
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;
}
p_converted->p[i_plane].i_visible_pitch );
}
}
- p_converted->pf_release( p_converted );
+ picture_Release( p_converted );
/* white rectangle on visualization */
v_w = p_oyp->i_pitch*ZOOM_FACTOR/(VIS_ZOOM*o_zoom);
{
int width = v_h + 90 - y;
width = (width*width)/160;
- if( (80 - y + v_h)*10 < o_zoom )
+ if( (80 - y + v_h)*ZOOM_FACTOR/10 < o_zoom )
{
vlc_memset( p_oyp->p_pixels + y*p_oyp->i_pitch, 0xff, width );
}
}
}
}
-
vout_DisplayPicture( p_vout->p_sys->p_vout, p_outpic );
}