[vlc-devel] commit: When the underlying access dies, suicide the stream ( Rémi Denis-Courmont )
git version control
git at videolan.org
Fri Jun 20 23:25:45 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Jun 21 00:26:48 2008 +0300| [3fe7ae53925a9543d188baa1ed9909e64904ac78]
When the underlying access dies, suicide the stream
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3fe7ae53925a9543d188baa1ed9909e64904ac78
---
src/input/stream.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/input/stream.c b/src/input/stream.c
index b469a90..8c669d0 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -1872,6 +1872,8 @@ static int AReadStream( stream_t *s, void *p_read, int i_read )
if( !p_sys->i_list )
{
i_read = p_access->pf_read( p_access, p_read, i_read );
+ if( p_access->b_die )
+ vlc_object_kill( s );
if( p_input )
{
vlc_mutex_lock( &p_input->p->counters.counters_lock );
@@ -1887,6 +1889,8 @@ static int AReadStream( stream_t *s, void *p_read, int i_read )
i_read = p_sys->p_list_access->pf_read( p_sys->p_list_access, p_read,
i_read );
+ if( p_access->b_die )
+ vlc_object_kill( s );
/* If we reached an EOF then switch to the next stream in the list */
if( i_read == 0 && p_sys->i_list_index + 1 < p_sys->i_list )
@@ -1938,6 +1942,8 @@ static block_t *AReadBlock( stream_t *s, bool *pb_eof )
if( !p_sys->i_list )
{
p_block = p_access->pf_block( p_access );
+ if( p_access->b_die )
+ vlc_object_kill( s );
if( pb_eof ) *pb_eof = p_access->info.b_eof;
if( p_input && p_block && libvlc_stats (p_access) )
{
@@ -1953,6 +1959,8 @@ static block_t *AReadBlock( stream_t *s, bool *pb_eof )
}
p_block = p_sys->p_list_access->pf_block( p_access );
+ if( p_access->b_die )
+ vlc_object_kill( s );
b_eof = p_sys->p_list_access->info.b_eof;
if( pb_eof ) *pb_eof = b_eof;
More information about the vlc-devel
mailing list