[vlc-commits] OpenCV: array identifier cannot be NULL

Rémi Denis-Courmont git at videolan.org
Wed Apr 23 18:38:40 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 23 19:38:25 2014 +0300| [3fa1290cacdd673f6bf0e6afcf9d2a1a64bd954f] | committer: Rémi Denis-Courmont

OpenCV: array identifier cannot be NULL

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

 modules/video_filter/opencv_wrapper.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c
index ec9e5c4..0ca54a3 100644
--- a/modules/video_filter/opencv_wrapper.c
+++ b/modules/video_filter/opencv_wrapper.c
@@ -283,14 +283,12 @@ static void ReleaseImages( filter_t* p_filter )
 {
     filter_sys_t* p_sys = p_filter->p_sys;
 
-    if (p_sys->p_cv_image)
+    for( int i = 0; i < VOUT_MAX_PLANES; i++ )
     {
-        for( int i = 0; i < VOUT_MAX_PLANES; i++ )
+        if (p_sys->p_cv_image[i] != NULL)
         {
-            if (p_sys->p_cv_image[i]) {
-                cvReleaseImageHeader(&(p_sys->p_cv_image[i]));
-                p_sys->p_cv_image[i] = NULL;
-            }
+            cvReleaseImageHeader(&(p_sys->p_cv_image[i]));
+            p_sys->p_cv_image[i] = NULL;
         }
     }
     p_sys->i_cv_image_size = 0;



More information about the vlc-commits mailing list