From 09923c8a08da705269f3b6c105fcbedd4d09ae67 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 17 Jan 2014 00:47:19 +0100 Subject: [PATCH] Make movit_mix ignore empty "mix" parameter strings. Previously, the parameter would have to be entirely unset (ie., NULL) for the transition progress to be used, which was suboptimal in some cases. --- src/modules/opengl/transition_movit_mix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/opengl/transition_movit_mix.cpp b/src/modules/opengl/transition_movit_mix.cpp index 4adc810e..3e7ef964 100644 --- a/src/modules/opengl/transition_movit_mix.cpp +++ b/src/modules/opengl/transition_movit_mix.cpp @@ -49,7 +49,8 @@ static int get_image( mlt_frame a_frame, uint8_t **image, mlt_image_format *form mlt_position position = mlt_transition_get_position( transition, a_frame ); mlt_position length = mlt_transition_get_length( transition ); int reverse = mlt_properties_get_int( properties, "reverse" ); - double mix = mlt_properties_get( properties, "mix" ) ? + const char* mix_str = mlt_properties_get( properties, "mix" ); + double mix = ( mix_str && strlen( mix_str ) > 0 ) ? mlt_properties_anim_get_double( properties, "mix", position, length ) : mlt_transition_get_progress( transition, a_frame ); double inverse = 1.0 - mix; -- 2.39.2