[vlc-commits] smooth: remove/propagate constant value

Rémi Denis-Courmont git at videolan.org
Thu Jul 9 18:33:20 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul  9 18:59:00 2015 +0300| [2a305595fa93e746000846309746e22e5890def1] | committer: Rémi Denis-Courmont

smooth: remove/propagate constant value

>From the downloader thread, b_close is always true.

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

 modules/stream_filter/smooth/downloader.c |   10 +---------
 modules/stream_filter/smooth/smooth.c     |    1 -
 modules/stream_filter/smooth/smooth.h     |    1 -
 3 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/modules/stream_filter/smooth/downloader.c b/modules/stream_filter/smooth/downloader.c
index 99b61e7..16b2845 100644
--- a/modules/stream_filter/smooth/downloader.c
+++ b/modules/stream_filter/smooth/downloader.c
@@ -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 );
diff --git a/modules/stream_filter/smooth/smooth.c b/modules/stream_filter/smooth/smooth.c
index 4fe06ba..da96850 100644
--- a/modules/stream_filter/smooth/smooth.c
+++ b/modules/stream_filter/smooth/smooth.c
@@ -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 );
diff --git a/modules/stream_filter/smooth/smooth.h b/modules/stream_filter/smooth/smooth.h
index 2aec88d..53b8fd7 100644
--- a/modules/stream_filter/smooth/smooth.h
+++ b/modules/stream_filter/smooth/smooth.h
@@ -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 ) \



More information about the vlc-commits mailing list