Commit 55bdfd25 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

MotionDetect: check for NULLITY at the right place.

Fix CID 234
parent 3dd8af26
......@@ -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 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment