From: Steinar H. Gunderson Date: Thu, 16 Jan 2014 23:47:19 +0000 (+0100) Subject: Make movit_mix ignore empty "mix" parameter strings. X-Git-Url: https://git.sesse.net/?p=mlt;a=commitdiff_plain;h=09923c8a08da705269f3b6c105fcbedd4d09ae67 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. --- 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;