]> git.sesse.net Git - vlc/commitdiff
MotionDetect: check for NULLITY at the right place.
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 30 Oct 2008 17:33:40 +0000 (18:33 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 30 Oct 2008 17:33:40 +0000 (18:33 +0100)
Fix CID 234

modules/video_filter/motiondetect.c

index 5eea3e5d78c0d9b1efbdf40b01a5c49efa683551..aaf8f3149dd66e25929b3a68d7acd933367ad30e 100644 (file)
@@ -157,9 +157,6 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_inpic )
 
     picture_t *p_outpic;
 
-    const uint8_t *p_inpix = p_inpic->p[Y_PLANE].p_pixels;
-    const int i_src_pitch = p_inpic->p[Y_PLANE].i_pitch;
-
     uint8_t *p_oldpix   = p_sys->p_old->p[Y_PLANE].p_pixels;
     const int i_old_pitch = p_sys->p_old->p[Y_PLANE].i_pitch;
     uint32_t *p_buf = p_sys->p_buf;
@@ -170,6 +167,9 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_inpic )
     if( !p_inpic )
         return NULL;
 
+    const uint8_t *p_inpix = p_inpic->p[Y_PLANE].p_pixels;
+    const int i_src_pitch = p_inpic->p[Y_PLANE].i_pitch;
+
     if( !p_sys->b_old )
     {
         picture_Copy( p_sys->p_old, p_inpic );