[vlc-commits] remoteosd: remove/propogate logically constant value

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


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul  9 19:47:55 2015 +0300| [23930b3272df625bf8b20ce5997d9b73f3bc4e41] | committer: Rémi Denis-Courmont

remoteosd: remove/propogate logically constant value

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

 modules/video_filter/remoteosd.c |   26 ++------------------------
 1 file changed, 2 insertions(+), 24 deletions(-)

diff --git a/modules/video_filter/remoteosd.c b/modules/video_filter/remoteosd.c
index 1f9715f..09ff915 100644
--- a/modules/video_filter/remoteosd.c
+++ b/modules/video_filter/remoteosd.c
@@ -230,8 +230,6 @@ struct filter_sys_t
 
     char          read_buffer[READ_BUFFER_SIZE];
 
-    bool          b_continue;
-
     vlc_thread_t  worker_thread;
 
     uint8_t       ar_color_table_yuv[256][4];
@@ -253,7 +251,6 @@ static int CreateFilter ( vlc_object_t *p_this )
 
     /* Populating struct */
     vlc_mutex_init( &p_sys->lock );
-    p_sys->b_continue = true;
     p_sys->i_socket = -1;
     p_sys->p_pic = NULL;
 
@@ -747,8 +744,6 @@ exit:
     if( p_sys->p_pic )
         picture_Release( p_sys->p_pic );
 
-    /* It will hide the subtitle */
-    p_sys->b_continue = false;
     p_sys->b_need_update = true;
     vlc_mutex_unlock( &p_sys->lock );
 
@@ -757,13 +752,6 @@ exit:
     return NULL;
 }
 
-static void update_request_thread_cleanup( void *obj )
-{
-    filter_t* p_filter = (filter_t*)obj;
-
-    p_filter->p_sys->b_continue = false;
-}
-
 static void* update_request_thread( void *obj )
 {
     filter_t* p_filter = (filter_t*)obj;
@@ -779,16 +767,12 @@ static void* update_request_thread( void *obj )
     udr.w = htons(p_sys->i_vnc_width);
     udr.h = htons(p_sys->i_vnc_height);
 
-    int w;
-    vlc_cleanup_push( update_request_thread_cleanup, p_filter );
-    w = write_exact(p_filter, p_sys->i_socket, (char*)&udr,
-                    sz_rfbFramebufferUpdateRequestMsg);
-    vlc_cleanup_pop();
+    int w = write_exact(p_filter, p_sys->i_socket, (char*)&udr,
+                        sz_rfbFramebufferUpdateRequestMsg);
 
     if( !w )
     {
         msg_Err( p_filter, "Could not write rfbFramebufferUpdateRequestMsg." );
-        update_request_thread_cleanup( p_filter );
         return NULL;
     }
 
@@ -796,7 +780,6 @@ static void* update_request_thread( void *obj )
 
     if( p_sys->b_vnc_poll)
     {
-        vlc_cleanup_push( update_request_thread_cleanup, p_filter );
         for( ;; )
         {
             msleep( p_sys->i_vnc_poll_interval * 1000 );
@@ -807,8 +790,6 @@ static void* update_request_thread( void *obj )
                 break;
             }
         }
-        vlc_cleanup_pop();
-        p_filter->p_sys->b_continue = false;
     }
     else
     {
@@ -1115,9 +1096,6 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
     p_spu->i_stop = 0;
     p_spu->b_ephemer = true;
 
-    if( !p_sys->b_continue )
-        p_spu->i_stop = p_spu->i_start + 1;
-
     /* Create new SPU region */
     memset( &fmt, 0, sizeof(video_format_t) );
     fmt.i_chroma = VLC_CODEC_YUVA;



More information about the vlc-commits mailing list