]> git.sesse.net Git - mlt/commitdiff
Fix rescaling of rgb images when not using gtk2
authorj-b-m <j-b-m@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 26 Oct 2006 09:05:48 +0000 (09:05 +0000)
committerj-b-m <j-b-m@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 26 Oct 2006 09:05:48 +0000 (09:05 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@935 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/core/filter_rescale.c

index 19b087f1ad86e018dbf97b5445b021fe6a19b004..b26047cd61db3366ad409746228f6b860f6a8c55 100644 (file)
@@ -62,21 +62,21 @@ static int filter_scale( mlt_frame this, uint8_t **image, mlt_image_format iform
                                uint8_t *alpha = mlt_pool_alloc( iwidth * ( iheight + 1 ) );
 
                                // Convert the image and extract alpha
-                               mlt_convert_rgb24a_to_yuv422( *image, iwidth, iheight, iwidth * 2, output, alpha );
+                               mlt_convert_rgb24a_to_yuv422( *image, iwidth, iheight, iwidth * 4, output, alpha );
 
                                mlt_properties_set_data( properties, "alpha", alpha, iwidth * ( iheight + 1 ), ( mlt_destructor )mlt_pool_release, NULL );
                        }
                        else
                        {
                                // No alpha to extract
-                               mlt_convert_rgb24_to_yuv422( *image, iwidth, iheight, iwidth * 2, output );
+                               mlt_convert_rgb24_to_yuv422( *image, iwidth, iheight, iwidth * 3, output );
                        }
 
+                       mlt_properties_set_data( properties, "image", output, iwidth * ( iheight + 1 ) * 2, ( mlt_destructor )mlt_pool_release, NULL );
+
                        // Scale the frame
-                       mlt_frame_rescale_yuv422( this, owidth, oheight );
-               
-                       // Return the output
-                       *image = mlt_properties_get_data( properties, "image", NULL );
+                       output = mlt_frame_rescale_yuv422( this, owidth, oheight );
+
                }
                else
                {