From 3a63c2147254f4382a91f007c86680259b41f1be Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Thu, 5 Feb 2004 20:04:57 +0000 Subject: [PATCH] resample fix git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@115 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/modules/resample/filter_resample.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/resample/filter_resample.c b/src/modules/resample/filter_resample.c index d4a87e1..c8fbf5f 100644 --- a/src/modules/resample/filter_resample.c +++ b/src/modules/resample/filter_resample.c @@ -45,6 +45,9 @@ static int resample_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_form float *output_buffer = mlt_properties_get_data( properties, "resample.output_buffer", NULL ); int i; + if ( output_rate == 0 ) + output_rate = *frequency; + // Restore the original get_audio frame->get_audio = mlt_properties_get_data( properties, "resample.get_audio", NULL ); @@ -87,8 +90,8 @@ static int resample_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_form (*buffer)[ i ] = lrint( 32768.0 * sample ); } } - //else - //fprintf( stderr, "resample_get_audio: %s\n", src_strerror( i ) ); + else + fprintf( stderr, "resample_get_audio: %s %d,%d,%d\n", src_strerror( i ), *frequency, *samples, output_rate ); return 0; } @@ -144,7 +147,7 @@ mlt_filter filter_resample_init( char *arg ) } else { - //fprintf( stderr, "filter_resample_init: %s\n", src_strerror( error ) ); + fprintf( stderr, "filter_resample_init: %s\n", src_strerror( error ) ); } } return this; -- 1.7.4.4