Commit 0954c25c authored by Jean-Paul Saman's avatar Jean-Paul Saman

access: oss.c: exit while-loop on error and end of p_demux objects lifetime.

Check vlc_object_alive( p_demux ) && !p_demux->b_error in while loop.
parent af806199
......@@ -298,23 +298,27 @@ static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
static int Demux( demux_t *p_demux )
{
demux_sys_t *p_sys = p_demux->p_sys;
block_t *p_block;
do {
p_block = NULL;
if( block_FifoCount( p_sys->p_grab->p_fifo ) > 0 )
{
block_t *p_block;
mtime_t i_pts;
p_block = block_FifoGet( p_sys->p_grab->p_fifo );
if( p_block )
if( !p_block )
break;
i_pts = p_block->i_pts;
es_out_Send( p_demux->out, p_sys->p_es, p_block );
if( p_sys->i_next_demux_date <= 0 &&
p_block->i_pts >= p_sys->i_next_demux_date )
goto out;
i_pts >= p_sys->i_next_demux_date )
break;
}
} while( p_block );
else break;
} while( vlc_object_alive(p_demux) || !p_demux->b_error );
out:
return 1;
}
......
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