[vlc-commits] goom: simplify use of vout_GetPicture()
    Rémi Denis-Courmont 
    git at videolan.org
       
    Sun Sep 27 22:05:14 CEST 2015
    
    
  
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Sep 27 23:04:36 2015 +0300| [82513bf14275dd518c1fd9391fb5acfe2b3512ea] | committer: Rémi Denis-Courmont
goom: simplify use of vout_GetPicture()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=82513bf14275dd518c1fd9391fb5acfe2b3512ea
---
 modules/visualization/goom.c |   14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/modules/visualization/goom.c b/modules/visualization/goom.c
index 1fa1878..d499d84 100644
--- a/modules/visualization/goom.c
+++ b/modules/visualization/goom.c
@@ -327,17 +327,9 @@ static void *Thread( void *p_thread_data )
         plane = goom_update( p_plugin_info, p_data, 0, 0.0,
                              NULL, NULL );
 
-        while( !( p_pic = vout_GetPicture( p_thread->p_vout ) ) )
-        {
-            vlc_mutex_lock( &p_thread->lock );
-            bool b_exit = p_thread->b_exit;
-            vlc_mutex_unlock( &p_thread->lock );
-            if( b_exit )
-                break;
-            msleep( VOUT_OUTMEM_SLEEP );
-        }
-
-        if( p_pic == NULL ) break;
+        p_pic = vout_GetPicture( p_thread->p_vout );
+        if( unlikely(p_pic == NULL) )
+            continue;
 
         memcpy( p_pic->p[0].p_pixels, plane, p_thread->i_width * p_thread->i_height * 4 );
 
    
    
More information about the vlc-commits
mailing list