From e4c309088914627f82a005eeb96e303dbdd7882a Mon Sep 17 00:00:00 2001 From: j-b-m Date: Sun, 5 Nov 2006 12:10:55 +0000 Subject: [PATCH] Luma get_image produces yuv only, so announce it. Fix problem when requesting rgb image of a luma transition. git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@936 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/modules/core/transition_luma.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/modules/core/transition_luma.c b/src/modules/core/transition_luma.c index e55046c..2f4b17d 100644 --- a/src/modules/core/transition_luma.c +++ b/src/modules/core/transition_luma.c @@ -369,6 +369,9 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f // Get the properties of the b frame mlt_properties b_props = MLT_FRAME_PROPERTIES( b_frame ); + // This compositer is yuv422 only + *format = mlt_image_yuv422; + // The cached luma map information int luma_width = mlt_properties_get_int( properties, "width" ); int luma_height = mlt_properties_get_int( properties, "height" ); @@ -512,6 +515,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f if ( mlt_properties_get( properties, "fixed" ) ) mix = mlt_properties_get_double( properties, "fixed" ); + if ( luma_width > 0 && luma_height > 0 && luma_bitmap != NULL ) // Composite the frames using a luma map luma_composite( !invert ? a_frame : b_frame, !invert ? b_frame : a_frame, luma_width, luma_height, luma_bitmap, mix, frame_delta, @@ -520,6 +524,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f // Dissolve the frames using the time offset for mix value dissolve_yuv( a_frame, b_frame, mix, *width, *height ); + // Extract the a_frame image info *width = mlt_properties_get_int( !invert ? a_props : b_props, "width" ); *height = mlt_properties_get_int( !invert ? a_props : b_props, "height" ); -- 1.7.4.4