smooth: remove/propagate constant value
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 9 Jul 2015 15:59:00 +0000 (18:59 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 9 Jul 2015 15:59:00 +0000 (18:59 +0300)
From the downloader thread, b_close is always true.

modules/stream_filter/smooth/downloader.c
modules/stream_filter/smooth/smooth.c
modules/stream_filter/smooth/smooth.h

index 99b61e7..16b2845 100644 (file)
@@ -639,7 +639,7 @@ void* sms_Thread( void *p_this )
     }
     vlc_cond_signal( &p_sys->playback.wait );
 
-    while( !p_sys->b_close )
+    for( ;; )
     {
         if ( !p_sys->b_live || !p_sys->download.lookahead_count )
             stream_Control( s, STREAM_GET_PTS_DELAY, &i_pts_delay );
@@ -650,14 +650,6 @@ void* sms_Thread( void *p_this )
                                            i_pts_delay ) )
         {
             vlc_cond_wait( &p_sys->download.wait, &p_sys->lock );
-            if( p_sys->b_close )
-                break;
-        }
-
-        if( p_sys->b_close )
-        {
-            vlc_mutex_unlock( &p_sys->lock );
-            break;
         }
 
         sms_stream_t *sms = next_download_stream( p_sys );
index 4fe06ba..da96850 100644 (file)
@@ -558,7 +558,6 @@ static void Close( vlc_object_t *p_this )
     stream_t *s = (stream_t*)p_this;
     stream_sys_t *p_sys = s->p_sys;
 
-    p_sys->b_close = true;
     vlc_cond_signal(&p_sys->download.wait);
 
     vlc_join( p_sys->download.thread, NULL );
index 2aec88d..53b8fd7 100644 (file)
@@ -136,7 +136,6 @@ struct stream_sys_t
 
     /* state */
     bool        b_live;      /* live stream? or vod? */
-    bool        b_close;     /* set by Close() */
 };
 
 #define SMS_GET_SELECTED_ST( cat ) \