Skip to content

Commit

Permalink
remove guess_offset (to be done properly in UI) (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
dany123 authored Oct 18, 2024
1 parent 24c833e commit b7d94b7
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/modules/qt/filter_gpstext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, ""))
Expand All @@ -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);
Expand Down

0 comments on commit b7d94b7

Please sign in to comment.