[vlc-commits] stream: use vlc_killed()

Rémi Denis-Courmont git at videolan.org
Wed Jul 1 18:22:14 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jun 30 23:52:51 2015 +0300| [fc3b19ddf4afcbe65bbfa52bdc9354f7fed85dcb] | committer: Rémi Denis-Courmont

stream: use vlc_killed()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc3b19ddf4afcbe65bbfa52bdc9354f7fed85dcb
---

 src/input/stream.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index 3251510..7a6e329 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -694,7 +694,7 @@ static void AStreamPrebufferBlock( stream_t *s )
         bool b_eof;
         block_t *b;
 
-        if( !vlc_object_alive(s) || p_sys->block.i_size > STREAM_CACHE_PREBUFFER_SIZE )
+        if( vlc_killed() || p_sys->block.i_size > STREAM_CACHE_PREBUFFER_SIZE )
         {
             int64_t i_byterate;
 
@@ -1024,7 +1024,7 @@ static int AStreamRefillBlock( stream_t *s )
     {
         bool b_eof;
 
-        if( !vlc_object_alive(s) )
+        if( vlc_killed() )
             return VLC_EGENERIC;
 
         /* Fetch a block */
@@ -1380,7 +1380,7 @@ static int AStreamRefillStream( stream_t *s )
         int i_off = tk->i_end % STREAM_CACHE_TRACK_SIZE;
         int i_read;
 
-        if( !vlc_object_alive(s) )
+        if( vlc_killed() )
             return VLC_EGENERIC;
 
         i_read = __MIN( i_toread, STREAM_CACHE_TRACK_SIZE - i_off );
@@ -1441,7 +1441,7 @@ static void AStreamPrebufferStream( stream_t *s )
         int i_read;
         int i_buffered = tk->i_end - tk->i_start;
 
-        if( !vlc_object_alive(s) || i_buffered >= STREAM_CACHE_PREBUFFER_SIZE )
+        if( vlc_killed() || i_buffered >= STREAM_CACHE_PREBUFFER_SIZE )
         {
             int64_t i_byterate;
 



More information about the vlc-commits mailing list