]> git.sesse.net Git - mlt/commitdiff
Fix segfault in sox with no effect.
authorDan Dennedy <dan@dennedy.org>
Fri, 30 Sep 2011 19:41:08 +0000 (12:41 -0700)
committerDan Dennedy <dan@dennedy.org>
Fri, 30 Sep 2011 19:41:08 +0000 (12:41 -0700)
src/modules/sox/filter_sox.c

index 9ad840bf4d6b6a43e22aead592c4a9d52fd1a9bc..3739526a46fdbdf4836ffd5590857626f53104eb 100644 (file)
@@ -202,7 +202,7 @@ static int filter_get_audio( mlt_frame frame, void **buffer, mlt_audio_format *f
        st_sample_t *output_buffer = mlt_properties_get_data( filter_properties, "output_buffer", NULL );
        int i; // channel
        int count = mlt_properties_get_int( filter_properties, "_effect_count" );
-       int analysis = !strcmp( mlt_properties_get( filter_properties, "effect" ), "analysis" );
+       int analysis = mlt_properties_get( filter_properties, "effect" ) && !strcmp( mlt_properties_get( filter_properties, "effect" ), "analysis" );
 
        // Get the producer's audio
        *format = mlt_audio_s32;