X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_consumer.c;h=86bed309025fe804f53021d5bf4e8b92bb93a520;hb=1171e98b787df5cbbba737df820d9c9611f81723;hp=aa95f91acbac343157976175b4176d6140b3ffc3;hpb=11410cf74f5de6c8f4460a8b12119fa5558153a1;p=melted 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