[vlc-commits] visual: 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:52 2015 +0300| [a574bf30730816fde61e81f2ea1c075b38a51790] | committer: Rémi Denis-Courmont

visual: simplify use of vout_GetPicture()

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

 modules/visualization/visual/visual.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/visualization/visual/visual.c b/modules/visualization/visual/visual.c
index 5ce328d..e323978 100644
--- a/modules/visualization/visual/visual.c
+++ b/modules/visualization/visual/visual.c
@@ -337,11 +337,11 @@ error:
 static block_t *DoRealWork( filter_t *p_filter, block_t *p_in_buf )
 {
     filter_sys_t *p_sys = p_filter->p_sys;
-    picture_t *p_outpic;
 
     /* First, get a new picture */
-    while( ( p_outpic = vout_GetPicture( p_sys->p_vout ) ) == NULL )
-        msleep( VOUT_OUTMEM_SLEEP );
+    picture_t *p_outpic = vout_GetPicture( p_sys->p_vout );
+    if( unlikely(p_outpic == NULL) )
+        return p_in_buf;
 
     /* Blank the picture */
     for( int i = 0 ; i < p_outpic->i_planes ; i++ )



More information about the vlc-commits mailing list