default mix to 0.5
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sat, 17 Jan 2004 00:11:40 +0000 (00:11 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sat, 17 Jan 2004 00:11:40 +0000 (00:11 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@84 d19143bc-622f-0410-bfdd-b5b2a6649095

mlt/src/modules/core/transition_mix.c
src/modules/core/transition_mix.c

index 4d32de7..fda1d1a 100644 (file)
@@ -42,7 +42,9 @@ static int transition_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_fo
        // Restore the original get_audio
        frame->get_audio = mlt_properties_get_data( a_props, "mix.get_audio", NULL );
 
-       double mix = mlt_properties_get_double( b_props, "audio.mix" );
+       double mix = 0.5;
+       if ( mlt_properties_get( b_props, "audio.mix" ) != NULL )
+               mix = mlt_properties_get_double( b_props, "audio.mix" );
        mlt_frame_mix_audio( frame, b_frame, mix, buffer, format, frequency, channels, samples );
 
        // Push the b_frame back on for get_image
index 4d32de7..fda1d1a 100644 (file)
@@ -42,7 +42,9 @@ static int transition_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_fo
        // Restore the original get_audio
        frame->get_audio = mlt_properties_get_data( a_props, "mix.get_audio", NULL );
 
-       double mix = mlt_properties_get_double( b_props, "audio.mix" );
+       double mix = 0.5;
+       if ( mlt_properties_get( b_props, "audio.mix" ) != NULL )
+               mix = mlt_properties_get_double( b_props, "audio.mix" );
        mlt_frame_mix_audio( frame, b_frame, mix, buffer, format, frequency, channels, samples );
 
        // Push the b_frame back on for get_image