mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
clock: Don't try to slave unsynced clocks
They will return useless values from get_time().
This commit is contained in:
parent
58b4e075a6
commit
ab827eca2e
1 changed files with 6 additions and 0 deletions
|
@ -1174,6 +1174,12 @@ gst_clock_slave_callback (GstClock * master, GstClockTime time,
|
||||||
GstClockTime stime, mtime;
|
GstClockTime stime, mtime;
|
||||||
gdouble r_squared;
|
gdouble r_squared;
|
||||||
|
|
||||||
|
if (!gst_clock_is_synced (clock)) {
|
||||||
|
GST_CAT_DEBUG_OBJECT (GST_CAT_CLOCK, clock,
|
||||||
|
"Slave clock is not synced yet");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
stime = gst_clock_get_internal_time (clock);
|
stime = gst_clock_get_internal_time (clock);
|
||||||
mtime = gst_clock_get_time (master);
|
mtime = gst_clock_get_time (master);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue