]> git.sesse.net Git - mlt/commitdiff
Fix composite using wrong B frame scaling.
authorDan Dennedy <dan@dennedy.org>
Mon, 28 Mar 2011 02:13:55 +0000 (19:13 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 28 Mar 2011 02:13:55 +0000 (19:13 -0700)
This could happen when the caller of mlt_frame_get_image supplied 0 for
width and height. For example, Kdenlive's GL output with the sdl_audio
consumer with real_time > 1 and paused.

src/modules/core/transition_composite.c

index 45683683b6de421e2f4e9f7ec41bd248848d6d97..811ee8d3f74c546c4c8f818b139dcb76906a3d21 100644 (file)
@@ -1120,8 +1120,8 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
 
                // Get the image from the b frame
                uint8_t *image_b = NULL;
-               int width_b = *width;
-               int height_b = *height;
+               int width_b = *width > 0 ? *width : mlt_properties_get_int( a_props, "normalised_width" );
+               int height_b = *height > 0 ? *height : mlt_properties_get_int( a_props, "normalised_height" );
        
                // Vars for alphas
                uint8_t *alpha_a = NULL;