alsasrc: driver timestamps only to be considered if system clock
authorRobert Rosengren <robertr@axis.com>
Mon, 29 Apr 2019 09:25:02 +0000 (11:25 +0200)
committerRobert Rosengren <robertr@axis.com>
Tue, 30 Apr 2019 08:55:52 +0000 (10:55 +0200)
The system clock check when considering to use driver timestamp
should not include sub-classes of system clock (such as the net clocks).

ext/alsa/gstalsasrc.c

index 3c28ac9..5f5a17b 100644 (file)
@@ -265,7 +265,7 @@ gst_alsasrc_change_state (GstElement * element, GstStateChange transition)
 
       clk = gst_element_get_clock (element);
       if (clk != NULL) {
-        if (GST_IS_SYSTEM_CLOCK (clk)) {
+        if (G_OBJECT_TYPE (clk) == GST_TYPE_SYSTEM_CLOCK) {
           gint clocktype;
           g_object_get (clk, "clock-type", &clocktype, NULL);
           if (clocktype == GST_CLOCK_TYPE_MONOTONIC &&