From f6916fa7282f6ec9fd30803aaa301fa32754cc77 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Fri, 29 May 2009 20:24:44 -0700 Subject: [PATCH] Workaround video streams with wild timestamps (kdenlive-854) Signed-off-by: Dan Dennedy --- src/modules/avformat/producer_avformat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c index 098fa570..18add100 100644 --- a/src/modules/avformat/producer_avformat.c +++ b/src/modules/avformat/producer_avformat.c @@ -840,6 +840,9 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form { int_position = req_position; } + // Make a dumb assumption on streams that contain wild timestamps + if ( (unsigned) req_position - (unsigned) int_position > 999 ) + int_position = req_position; mlt_properties_set_int( properties, "_last_position", int_position ); // Decode the image -- 2.39.2