Commit fc5156cc authored by Edward Wang's avatar Edward Wang Committed by Jean-Baptiste Kempf

visual: remove depreciated vlc_object_alive

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 73e24627
...@@ -198,6 +198,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -198,6 +198,7 @@ static int Open( vlc_object_t *p_this )
if( (p_sys->i_height % 2 ) != 0 ) p_sys->i_height--; if( (p_sys->i_height % 2 ) != 0 ) p_sys->i_height--;
if( (p_sys->i_width % 2 ) != 0 ) p_sys->i_width--; if( (p_sys->i_width % 2 ) != 0 ) p_sys->i_width--;
p_sys->b_close = false;
p_sys->i_effect = 0; p_sys->i_effect = 0;
p_sys->effect = NULL; p_sys->effect = NULL;
...@@ -323,13 +324,13 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf ) ...@@ -323,13 +324,13 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
picture_t *p_outpic; picture_t *p_outpic;
/* First, get a new picture */ /* First, get a new picture */
while( ( p_outpic = vout_GetPicture( p_sys->p_vout ) ) == NULL) do
{ /* XXX: This looks like a bad idea. Don't run to me for sympathy if it {
* dead locks... */ if( p_sys->b_close )
if( !vlc_object_alive (p_sys->p_vout) )
return NULL; return NULL;
msleep( VOUT_OUTMEM_SLEEP ); msleep( VOUT_OUTMEM_SLEEP );
} }
while( ( p_outpic = vout_GetPicture( p_sys->p_vout ) ) == NULL);
/* Blank the picture */ /* Blank the picture */
for( int i = 0 ; i < p_outpic->i_planes ; i++ ) for( int i = 0 ; i < p_outpic->i_planes ; i++ )
...@@ -364,6 +365,8 @@ static void Close( vlc_object_t *p_this ) ...@@ -364,6 +365,8 @@ static void Close( vlc_object_t *p_this )
filter_t * p_filter = (filter_t *)p_this; filter_t * p_filter = (filter_t *)p_this;
filter_sys_t *p_sys = p_filter->p_sys; filter_sys_t *p_sys = p_filter->p_sys;
p_sys->b_close = true;
if( p_filter->p_sys->p_vout ) if( p_filter->p_sys->p_vout )
{ {
aout_filter_RequestVout( p_filter, p_filter->p_sys->p_vout, 0 ); aout_filter_RequestVout( p_filter, p_filter->p_sys->p_vout, 0 );
......
...@@ -63,7 +63,8 @@ typedef struct ...@@ -63,7 +63,8 @@ typedef struct
*****************************************************************************/ *****************************************************************************/
struct filter_sys_t struct filter_sys_t
{ {
vout_thread_t *p_vout; vout_thread_t* p_vout;
bool b_close;
int i_width; int i_width;
int i_height; int i_height;
......
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