]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/motiondetect.c
Used picture_NewFromFormat when appropriate.
[vlc] / modules / video_filter / motiondetect.c
index e06b4d7879c564d74cce177570774dcbe251bdc1..5d875186f8819da69617f0e3383a66f5d11a7855 100644 (file)
@@ -114,8 +114,7 @@ static int Create( vlc_object_t *p_this )
         return VLC_ENOMEM;
 
     p_sys->b_old = false;
-    p_sys->p_old = picture_New( p_fmt->i_chroma,
-                                p_fmt->i_width, p_fmt->i_height, 0 );
+    p_sys->p_old = picture_NewFromFormat( p_fmt );
     p_sys->p_buf  = calloc( p_fmt->i_width * p_fmt->i_height, sizeof(*p_sys->p_buf) );
     p_sys->p_buf2 = calloc( p_fmt->i_width * p_fmt->i_height, sizeof(*p_sys->p_buf) );