]> git.sesse.net Git - mlt/commitdiff
Make movit_mix ignore empty "mix" parameter strings.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 16 Jan 2014 23:47:19 +0000 (00:47 +0100)
committerDan Dennedy <dan@dennedy.org>
Fri, 17 Jan 2014 03:27:51 +0000 (19:27 -0800)
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

index 4adc810e9dc7f83cc14ec9b09e138699d16a66f6..3e7ef964879c59faab70fb477508e4bd591428db 100644 (file)
@@ -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;