[vlc-devel] commit: Protect a few whiles againts possible broken decoder. ( Laurent Aimar )

git version control git at videolan.org
Thu Oct 9 00:14:24 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Oct  7 20:00:15 2008 +0200| [41bacf4a0d33213c28ec34e8f80332d5ae81d367] | committer: Laurent Aimar 

Protect a few whiles againts possible broken decoder.

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

 src/input/decoder.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index ce73258..183d7db 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -339,7 +339,7 @@ void input_DecoderDecode( decoder_t * p_dec, block_t *p_block )
         if( p_owner->p_input->p->b_out_pace_control )
         {
             /* FIXME !!!!! */
-            while( !p_dec->b_die && !p_dec->b_error &&
+            while( vlc_object_alive( p_dec ) && !p_dec->b_error &&
                    block_FifoCount( p_owner->p_fifo ) > 10 )
             {
                 msleep( 1000 );
@@ -724,7 +724,7 @@ static void DecoderFlush( decoder_t *p_dec )
     /* */
     if( p_owner->b_own_thread )
     {
-        while( p_owner->b_flushing )
+        while( vlc_object_alive( p_dec ) && p_owner->b_flushing )
             vlc_cond_wait( &p_owner->wait, &p_owner->lock );
     }
 }




More information about the vlc-devel mailing list