[vlc-commits] vda: simplify conditionals

Tristan Matthews git at videolan.org
Thu Oct 20 16:03:16 CEST 2016


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Thu Oct 20 09:32:14 2016 -0400| [bc677155cbfffd4a600595b24864ddd001d1a8c3] | committer: Tristan Matthews

vda: simplify conditionals

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

 modules/codec/avcodec/vda.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/modules/codec/avcodec/vda.c b/modules/codec/avcodec/vda.c
index cb4070e..30cbcd5 100644
--- a/modules/codec/avcodec/vda.c
+++ b/modules/codec/avcodec/vda.c
@@ -183,16 +183,11 @@ static int Extract( vlc_va_t *va, picture_t *p_picture, uint8_t *data )
 
     CVPixelBufferRef cv_buffer = (CVPixelBufferRef)data;
 
-    if( !cv_buffer )
+    if( !cv_buffer || !CVPixelBufferGetDataSize(cv_buffer) )
     {
         msg_Dbg( va, "Frame buffer is empty.");
         return VLC_EGENERIC;
     }
-    if (!CVPixelBufferGetDataSize(cv_buffer) > 0)
-    {
-        msg_Dbg( va, "Empty frame buffer");
-        return VLC_EGENERIC;
-    }
 
     copy420YpCbCr8Planar( p_picture, cv_buffer, sys->i_width, sys->i_height );
 



More information about the vlc-commits mailing list