X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fmotionblur.c;h=4b9bafeb7172fa7a6e02b2ef0d13c3b4f60fd57c;hb=be378fbc80c384e2541517d6853b59411b7e67de;hp=441c378851439fc80b0822a59a88125771117908;hpb=5e15258c9ef28558fe2abc941fc1527e02b04c21;p=vlc diff --git a/modules/video_filter/motionblur.c b/modules/video_filter/motionblur.c index 441c378851..4b9bafeb71 100644 --- a/modules/video_filter/motionblur.c +++ b/modules/video_filter/motionblur.c @@ -30,11 +30,12 @@ # include "config.h" #endif -#include +#include #include #include #include #include +#include "filter_picture.h" /***************************************************************************** * Local protypes @@ -95,10 +96,7 @@ static int Create( vlc_object_t *p_this ) /* Allocate structure */ p_filter->p_sys = malloc( sizeof( filter_sys_t ) ); if( p_filter->p_sys == NULL ) - { - msg_Err( p_filter, "out of memory" ); return VLC_ENOMEM; - } p_filter->pf_video_filter = Filter; @@ -129,17 +127,6 @@ static void Destroy( vlc_object_t *p_this ) free( p_filter->p_sys ); } -#define RELEASE( pic ) \ - if( pic ->pf_release ) \ - pic ->pf_release( pic ); - -#define INITPIC( dst, src ) \ - dst ->date = src ->date; \ - dst ->b_force = src ->b_force; \ - dst ->i_nb_fields = src ->i_nb_fields; \ - dst ->b_progressive = src->b_progressive; \ - dst ->b_top_field_first = src ->b_top_field_first; - /***************************************************************************** * Filter *****************************************************************************/ @@ -150,14 +137,12 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) if( !p_pic ) return NULL; - p_outpic = p_filter->pf_vout_buffer_new( p_filter ); + p_outpic = filter_NewPicture( p_filter ); if( !p_outpic ) { - msg_Warn( p_filter, "can't get output picture" ); - RELEASE( p_pic ); + picture_Release( p_pic ); return NULL; } - INITPIC( p_outpic, p_pic ); if( !p_sys->pp_planes ) { @@ -178,8 +163,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) RenderBlur( p_sys, p_pic, p_outpic ); Copy( p_filter, p_outpic ); - RELEASE( p_pic ); - return p_outpic; + return CopyInfoAndRelease( p_outpic, p_pic ); } /*****************************************************************************