From 1171e98b787df5cbbba737df820d9c9611f81723 Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Sun, 2 May 2004 23:13:12 +0000 Subject: [PATCH] audio/video processing swap git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@301 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/framework/mlt_consumer.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c index aa95f91..86bed30 100644 --- a/src/framework/mlt_consumer.c +++ b/src/framework/mlt_consumer.c @@ -309,14 +309,6 @@ static void *consumer_read_ahead_thread( void *arg ) count = 1; } - // Always process audio - if ( !audio_off ) - { - samples = mlt_sample_calculator( fps, frequency, counter++ ); - mlt_frame_get_audio( frame, &pcm, &afmt, &frequency, &channels, &samples ); - frame->get_audio = NULL; - } - // Get the image if ( ( time_frame + time_image ) / count < 40000 ) { @@ -324,7 +316,6 @@ static void *consumer_read_ahead_thread( void *arg ) if ( !video_off ) mlt_frame_get_image( frame, &image, &this->format, &width, &height, 0 ); mlt_properties_set_int( mlt_frame_properties( frame ), "rendered", 1 ); - time_image += time_difference( &ante ); // Reset the skipped count skipped = 0; @@ -343,6 +334,17 @@ static void *consumer_read_ahead_thread( void *arg ) count = 0; } } + + // Always process audio + if ( !audio_off ) + { + samples = mlt_sample_calculator( fps, frequency, counter++ ); + mlt_frame_get_audio( frame, &pcm, &afmt, &frequency, &channels, &samples ); + frame->get_audio = NULL; + } + + // Increment the time take for this frame + time_image += time_difference( &ante ); } // Remove the last frame -- 1.7.4.4