]> git.sesse.net Git - mlt/commitdiff
fix video_delay when using new_seek (AVCHD)
authorDan Dennedy <dan@dennedy.org>
Fri, 1 Jun 2012 18:16:00 +0000 (11:16 -0700)
committerDan Dennedy <dan@dennedy.org>
Fri, 1 Jun 2012 19:03:47 +0000 (12:03 -0700)
src/modules/avformat/producer_avformat.c

index a8dd5ebd8c753811e23cf5ae9d11c52af1117c1d..38d12fa6767998fdf49b1593e89710849b5004d4 100644 (file)
@@ -1662,7 +1662,7 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
                                                        pts -= self->first_pts;
                                                else if ( context->start_time != AV_NOPTS_VALUE )
                                                        pts -= context->start_time;
-                                               int_position = ( int64_t )( av_q2d( stream->time_base) * pts * source_fps + 0.1 );
+                                               int_position = ( int64_t )( ( av_q2d( stream->time_base) * pts + delay ) * source_fps + 0.1 );
                                                mlt_log_debug( MLT_PRODUCER_SERVICE(producer), "got frame %"PRId64", key %d\n", int_position, self->av_frame->key_frame );
                                        }
                                        // Handle ignore