if ( !p_input_thread )
return false;
- b_will_play = !p_input_thread->b_die && !p_input_thread->b_dead;
+ b_will_play = !p_input_thread->b_dead;
vlc_object_release( p_input_thread );
return b_will_play;
}
/* Wait for standard to settle down */
- while ( !p_demux->b_die )
+ while ( vlc_object_alive(p_demux) )
{
struct pollfd pfd[1];
}
}
}
- if ( p_demux->b_die )
+ if ( !vlc_object_alive(p_demux) )
{
close( p_sys->i_vfd );
return VLC_EGENERIC;
if( MMSTUOpen ( p_access ) )
{
- if( p_access->b_die )
+ if( !vlc_object_alive(p_access) )
return VLC_EGENERIC;
/* try mmsh if mmstu failed */
{ /* first try with TCP and then UDP*/
if( ( i_status = MMSOpen( p_access, &p_sys->url, MMS_PROTO_TCP ) ) )
{
- if( !p_access->b_die )
+ if( vlc_object_alive(p_access) )
i_status = MMSOpen( p_access, &p_sys->url, MMS_PROTO_UDP );
}
}
* that's why vlc_object_alive() has been deprecated. But if I
* understood well, there is no good solution with a stream_filter
* module anyaway. */
- if( !wait || s->b_die || p_sys->b_error )
+ if( !wait || p_sys->b_error )
{
vlc_mutex_unlock( &p_sys->download.lock_wait );
msg_Warn( s, "get_chunk failed! (playback index %u)",
/* We don't try to reselect */
if( es->p_dec )
{
- while( !p_sys->p_input->b_die && !p_sys->b_buffering && es->p_dec )
+ while( vlc_object_alive(p_sys->p_input) && !p_sys->b_buffering && es->p_dec )
{
if( input_DecoderIsEmpty( es->p_dec ) &&
( !es->p_dec_record || input_DecoderIsEmpty( es->p_dec_record ) ))
bool b_eof;
block_t *b;
- if( s->b_die || p_sys->block.i_size > STREAM_CACHE_PREBUFFER_SIZE )
+ if( !vlc_object_alive(s) || p_sys->block.i_size > STREAM_CACHE_PREBUFFER_SIZE )
{
int64_t i_byterate;
{
bool b_eof;
- if( s->b_die )
+ if( !vlc_object_alive(s) )
return VLC_EGENERIC;
/* Fetch a block */
int i_off = tk->i_end % STREAM_CACHE_TRACK_SIZE;
int i_read;
- if( s->b_die )
+ if( !vlc_object_alive(s) )
return VLC_EGENERIC;
i_read = __MIN( i_toread, STREAM_CACHE_TRACK_SIZE - i_off );
int i_read;
int i_buffered = tk->i_end - tk->i_start;
- if( s->b_die || i_buffered >= STREAM_CACHE_PREBUFFER_SIZE )
+ if( !vlc_object_alive(s) || i_buffered >= STREAM_CACHE_PREBUFFER_SIZE )
{
int64_t i_byterate;
{
if (ufd[1].revents)
{
- assert (p_this->b_die);
msg_Dbg (p_this, "socket %d polling interrupted", fd);
#if defined(WIN32)
WSASetLastError (WSAEINTR);
{
if (ufd[1].revents)
{
- assert (p_this->b_die);
errno = EINTR;
goto error;
}
bool b_locked )
{
playlist_item_t *p_item;
- if( p_playlist->b_die ) return VLC_EGENERIC;
+ /* FIXME: use b_killed instead: */
+ if( !vlc_object_alive(p_playlist) ) return VLC_EGENERIC;
if( !pl_priv(p_playlist)->b_doing_ml )
PL_DEBUG( "adding item `%s' ( %s )", p_input->psz_name,
p_input->psz_uri );
assert( p_input );
assert( p_parent && p_parent->i_children != -1 );
- if( p_playlist->b_die )
+ /* FIXME: use b_killed instead: */
+ if( !vlc_object_alive(p_playlist) )
return NULL;
+
PL_LOCK_IF( !b_locked );
p_item = playlist_ItemNewFromInput( p_playlist, p_input );
if( !p_input )
return VLC_EGENERIC;
- if( ( p_sys->request.b_request || p_sys->killed ) && !p_input->b_die )
+ if( ( p_sys->request.b_request || p_sys->killed ) && vlc_object_alive(p_input) )
{
PL_DEBUG( "incoming request - stopping current input" );
input_Stop( p_input, true );
return VLC_EGENERIC;
}
/* This input is dying, let it do */
- else if( p_input->b_die )
+ else if( !vlc_object_alive(p_input) )
{
PL_DEBUG( "dying input" );
}