From cf78109dc7e67f65d74f8139369b583ad0f6398e Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Sun, 30 May 2004 23:04:07 +0000 Subject: [PATCH] slightly better seeking in drop frame cases git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@320 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/modules/avformat/producer_avformat.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c index b936ff3..1a5e2ee 100644 --- a/src/modules/avformat/producer_avformat.c +++ b/src/modules/avformat/producer_avformat.c @@ -418,7 +418,7 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form // Fast forward - seeking is inefficient for small distances - just ignore following frames ignore = position - expected; } - else + else if ( position < expected || position - expected >= 12 ) { // Set to the real timecode av_seek_frame( context, -1, mlt_properties_get_double( properties, "start_time" ) + real_timecode * 1000000.0 ); @@ -765,7 +765,7 @@ static int producer_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_form // Fast forward - seeking is inefficient for small distances - just ignore following frames ignore = position - expected; } - else + else if ( position < expected || position - expected >= 12 ) { // Set to the real timecode if ( av_seek_frame( context, -1, mlt_properties_get_double( properties, "start_time" ) + real_timecode * 1000000.0 ) != 0 ) -- 1.7.4.4