From b7d94b765892c5157d8bf80edd06fc33fbb7975f Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 18 Oct 2024 19:29:16 +0300 Subject: [PATCH] remove guess_offset (to be done properly in UI) (#1040) --- src/modules/qt/filter_gpstext.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/modules/qt/filter_gpstext.cpp b/src/modules/qt/filter_gpstext.cpp index fea435da6..b34547fca 100644 --- a/src/modules/qt/filter_gpstext.cpp +++ b/src/modules/qt/filter_gpstext.cpp @@ -536,8 +536,6 @@ static void process_file(mlt_filter filter, mlt_frame frame) if (filename == NULL) filename = mlt_properties_get(properties, "gps.file"); /* for backwards compatibility with v1 */ - bool guess_offset = (mlt_properties_get_int(properties, "time_offset") == 0) - && (strlen(pdata->last_filename) == 0); //if there's no file selected just return if (!filename || !strcmp(filename, "")) @@ -553,13 +551,6 @@ static void process_file(mlt_filter filter, mlt_frame frame) get_first_gps_time(filter_to_gps_data(filter)); get_last_gps_time(filter_to_gps_data(filter)); - //when loading the first file, sync gps start with video start - int64_t original_video_time = get_original_video_file_time_mseconds(frame); - if (guess_offset) { - pdata->gps_offset = pdata->first_gps_time - original_video_time; - mlt_properties_set_int(properties, "time_offset", pdata->gps_offset / 1000); - } - //assume smooth is 5 (default) so we can guarantee *gps_points_p and save some time pdata->last_smooth_lvl = 5; process_gps_smoothing(filter_to_gps_data(filter), 1);