summaryrefslogtreecommitdiff
path: root/ext/raw1394
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <amorales@flumotion.com>2011-06-20 18:49:57 +0200
committerDavid Schleef <ds@schleef.org>2011-06-24 12:01:39 -0700
commitd9f4c59c494cce8bb732089b8a4e6448c9abb60f (patch)
tree6caa4ef2f52cc3a7487304a487aa71cd51969755 /ext/raw1394
parent977a5eee7abf5ac9ed341bb6cf0a2d5785a7baac (diff)
dv1394src: make the internal clock thread safe
Fixes: #653091.
Diffstat (limited to 'ext/raw1394')
-rw-r--r--ext/raw1394/gst1394clock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/raw1394/gst1394clock.c b/ext/raw1394/gst1394clock.c
index b7d4a8f17..0505c8cb1 100644
--- a/ext/raw1394/gst1394clock.c
+++ b/ext/raw1394/gst1394clock.c
@@ -113,6 +113,7 @@ gst_1394_clock_get_internal_time (GstClock * clock)
_1394clock = GST_1394_CLOCK_CAST (clock);
if (_1394clock->handle != NULL) {
+ GST_OBJECT_LOCK (clock);
raw1394_read_cycle_timer (_1394clock->handle, &cycle_timer, &local_time);
if (cycle_timer < _1394clock->cycle_timer_lo) {
@@ -130,6 +131,7 @@ gst_1394_clock_get_internal_time (GstClock * clock)
result += (((cycle_timer >> 12) & 0x1fff) * 125) * GST_USECOND;
GST_LOG_OBJECT (clock, "result %" GST_TIME_FORMAT, GST_TIME_ARGS (result));
+ GST_OBJECT_UNLOCK (clock);
} else {
result = GST_CLOCK_TIME_NONE;
}