]> git.sesse.net Git - mlt/commitdiff
let mlt_frame_set_alpha clear the get_alpha_mask function pointer
authorDan Dennedy <dan@dennedy.org>
Mon, 20 Feb 2012 21:51:06 +0000 (13:51 -0800)
committerDan Dennedy <dan@dennedy.org>
Mon, 20 Feb 2012 21:51:06 +0000 (13:51 -0800)
src/framework/mlt_frame.c
src/modules/avformat/filter_avcolour_space.c
src/modules/core/filter_crop.c
src/modules/core/filter_resize.c
src/modules/core/transition_region.c

index 723e7feb7e00bf67b7cda788005257c344448d12..fdf79957a9875fd8f1a9eac8ec2d29c321d52cc8 100644 (file)
@@ -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 );
 }
 
index f812146a2162e114e1a65197ea46dd244d5e0023..3e804e9c4dc584d813e961260209d6e6be327d50 100644 (file)
@@ -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;
                        }
                }
 
index 3c45e24d03e1df6575d8650294f2fb278c341b78..72486cd41e7f8fda8cc001d696b86fe9273cc4d4 100644 (file)
@@ -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;
index af7a0254f55d16315edb58088b46cabb2e084ea9..d76fcf0bdf5d309f04f0c3c7e2f391447a44018c 100644 (file)
@@ -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
index 3822df9bbc532b28882e7d234ffe805aa9b0badf..4486d23d0d72eb21fcfbe94bf615a5564a94f92c 100644 (file)
@@ -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;
 }