]> git.sesse.net Git - mlt/commitdiff
Workaround video streams with wild timestamps (kdenlive-854)
authorDan Dennedy <dan@dennedy.org>
Sat, 30 May 2009 03:24:44 +0000 (20:24 -0700)
committerDan Dennedy <dan@dennedy.org>
Thu, 4 Jun 2009 01:39:14 +0000 (18:39 -0700)
Signed-off-by: Dan Dennedy <dan@dennedy.org>
src/modules/avformat/producer_avformat.c

index 098fa5709b5a4b1b692308e7c2dac64306a0446e..18add100883c1ad42df4021488980edbd095b417 100644 (file)
@@ -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