From ed81682813ba073cf5b4af93d48c823c9152ce5d Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Mon, 20 Feb 2012 13:51:06 -0800 Subject: [PATCH] let mlt_frame_set_alpha clear the get_alpha_mask function pointer --- src/framework/mlt_frame.c | 1 + src/modules/avformat/filter_avcolour_space.c | 1 - src/modules/core/filter_crop.c | 1 - src/modules/core/filter_resize.c | 3 --- src/modules/core/transition_region.c | 2 -- 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c index 723e7feb..fdf79957 100644 --- a/src/framework/mlt_frame.c +++ b/src/framework/mlt_frame.c @@ -322,6 +322,7 @@ int mlt_frame_set_image( mlt_frame self, uint8_t *image, int size, mlt_destructo int mlt_frame_set_alpha( mlt_frame self, uint8_t *alpha, int size, mlt_destructor destroy ) { + self->get_alpha_mask = NULL; return mlt_properties_set_data( MLT_FRAME_PROPERTIES( self ), "alpha", alpha, size, destroy, NULL ); } diff --git a/src/modules/avformat/filter_avcolour_space.c b/src/modules/avformat/filter_avcolour_space.c index f812146a..3e804e9c 100644 --- a/src/modules/avformat/filter_avcolour_space.c +++ b/src/modules/avformat/filter_avcolour_space.c @@ -198,7 +198,6 @@ static int convert_image( mlt_frame frame, uint8_t **image, mlt_image_format *fo while ( --n > 0 ); } mlt_frame_set_alpha( frame, alpha, len, mlt_pool_release ); - frame->get_alpha_mask = NULL; } } diff --git a/src/modules/core/filter_crop.c b/src/modules/core/filter_crop.c index 3c45e24d..72486cd4 100644 --- a/src/modules/core/filter_crop.c +++ b/src/modules/core/filter_crop.c @@ -129,7 +129,6 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * { crop( alpha, newalpha, 1, *width, *height, left, right, top, bottom ); mlt_frame_set_alpha( this, newalpha, owidth * oheight, mlt_pool_release ); - this->get_alpha_mask = NULL; } } *width = owidth; diff --git a/src/modules/core/filter_resize.c b/src/modules/core/filter_resize.c index af7a0254..d76fcf0b 100644 --- a/src/modules/core/filter_resize.c +++ b/src/modules/core/filter_resize.c @@ -156,10 +156,7 @@ static uint8_t *frame_resize_image( mlt_frame this, int owidth, int oheight, int { alpha = resize_alpha( alpha, owidth, oheight, iwidth, iheight, alpha_value ); if ( alpha ) - { mlt_frame_set_alpha( this, alpha, owidth * oheight, mlt_pool_release ); - this->get_alpha_mask = NULL; - } } // Return the output diff --git a/src/modules/core/transition_region.c b/src/modules/core/transition_region.c index 3822df9b..4486d23d 100644 --- a/src/modules/core/transition_region.c +++ b/src/modules/core/transition_region.c @@ -130,8 +130,6 @@ static uint8_t *filter_get_alpha_mask( mlt_frame this ) mlt_frame_set_alpha( this, alpha, region_width * region_height, NULL ); } - this->get_alpha_mask = NULL; - return alpha; } -- 2.39.2