]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/chain.c
C++ compile fix
[vlc] / modules / video_filter / chain.c
index d7235e4873dbbf797c5048c7eaca027582fabe72..6642dd0539ca21dbe41d6218853380328f34d0ce 100644 (file)
@@ -91,12 +91,10 @@ static int Activate( vlc_object_t *p_this )
     if( !b_chroma && !b_resize )
         return VLC_EGENERIC;
 
-    p_sys = p_filter->p_sys = malloc( sizeof( *p_sys ) );
+    p_sys = p_filter->p_sys = calloc( 1, sizeof( *p_sys ) );
     if( !p_sys )
         return VLC_ENOMEM;
 
-    memset( p_sys, 0, sizeof( *p_sys ) );
-
     p_sys->p_chain = filter_chain_New( p_filter, "video filter2", false, BufferAllocationInit, NULL, p_filter );
     if( !p_sys->p_chain )
     {
@@ -255,8 +253,8 @@ static void BufferDel( filter_t *p_filter, picture_t *p_pic )
 }
 static int BufferAllocationInit ( filter_t *p_filter, void *p_data )
 {
-    p_filter->pf_vout_buffer_new = BufferNew;
-    p_filter->pf_vout_buffer_del = BufferDel;
+    p_filter->pf_video_buffer_new = BufferNew;
+    p_filter->pf_video_buffer_del = BufferDel;
     p_filter->p_owner = p_data;
     return VLC_SUCCESS;
 }