]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/swscale.c
Use filter helpers.
[vlc] / modules / video_filter / swscale.c
index 5e0e8d0928ada326ec7c6b094f00f4a7844a3a1b..ba7a98192b02087af819b19a679d6755990dcf40 100644 (file)
@@ -283,13 +283,17 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     int i_nb_planes = p_pic->i_planes;
 
     /* Check if format properties changed */
-    if( CheckInit( p_filter ) != VLC_SUCCESS ) return NULL;
+    if( CheckInit( p_filter ) != VLC_SUCCESS )
+    {
+        picture_Release( p_pic );
+        return NULL;
+    }
 
     /* Request output picture */
-    p_pic_dst = p_filter->pf_vout_buffer_new( p_filter );
+    p_pic_dst = filter_NewPicture( p_filter );
     if( !p_pic_dst )
     {
-        msg_Warn( p_filter, "can't get output picture" );
+        picture_Release( p_pic );
         return NULL;
     }