summaryrefslogtreecommitdiff
path: root/sys/decklink/gstdecklink.cpp
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-09-23 15:56:26 +0200
committerSebastian Dröge <sebastian@centricular.com>2015-09-24 09:32:36 +0200
commit9764e22a5c150238fe5e5368c3816bcacc8dc0a4 (patch)
tree4938c92257e6f5e209d0bec50f19cb5eb274c5dc /sys/decklink/gstdecklink.cpp
parente0fd5317df193acb671e67f276a2ca2e5fa8c4b8 (diff)
downloadgstreamer-plugins-bad-9764e22a5c150238fe5e5368c3816bcacc8dc0a4.tar.gz
decklink: Add a clock epoch that is used as offset whenever restarting the clock
Otherwise we're going to return times starting at 0 again after shutting down an element for a specific input/output and then using it again later. https://bugzilla.gnome.org/show_bug.cgi?id=755426
Diffstat (limited to 'sys/decklink/gstdecklink.cpp')
-rw-r--r--sys/decklink/gstdecklink.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
index f3ddeb907..eb39bdb46 100644
--- a/sys/decklink/gstdecklink.cpp
+++ b/sys/decklink/gstdecklink.cpp
@@ -885,6 +885,7 @@ gst_decklink_clock_get_internal_time (GstClock * clock)
self->input->clock_last_time = result;
}
+ result += self->input->clock_epoch;
g_mutex_unlock (&self->input->lock);
} else if (self->output != NULL) {
g_mutex_lock (&self->output->lock);
@@ -924,6 +925,7 @@ gst_decklink_clock_get_internal_time (GstClock * clock)
self->output->clock_last_time = result;
}
+ result += self->output->clock_epoch;
g_mutex_unlock (&self->output->lock);
} else {
g_assert_not_reached ();