summaryrefslogtreecommitdiff
path: root/src/lib/file_group.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/file_group.cc')
-rw-r--r--src/lib/file_group.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc
index dfe336b8f..9d042554c 100644
--- a/src/lib/file_group.cc
+++ b/src/lib/file_group.cc
@@ -100,7 +100,11 @@ FileGroup::seek (int64_t pos, int whence) const
for (size_t i = 0; i < _current_path; ++i) {
full_pos += boost::filesystem::file_size (_paths[i]);
}
+#ifdef DCPOMATIC_WINDOWS
+ full_pos += _ftelli64 (_current_file);
+#else
full_pos += ftell (_current_file);
+#endif
full_pos += pos;
break;
case SEEK_END:
@@ -125,7 +129,7 @@ FileGroup::seek (int64_t pos, int whence) const
}
ensure_open_path (i);
- fseek (_current_file, sub_pos, SEEK_SET);
+ dcpomatic_fseek (_current_file, sub_pos, SEEK_SET);
return full_pos;
}