net: GST_EXPORT -> GST_NET_API
[platform/upstream/gstreamer.git] / libs / gst / net / gstptpclock.c
index 8258b14..e1e0955 100644 (file)
@@ -296,8 +296,10 @@ typedef struct
 static void
 ptp_pending_sync_free (PtpPendingSync * sync)
 {
-  if (sync->timeout_source)
+  if (sync->timeout_source) {
     g_source_destroy (sync->timeout_source);
+    g_source_unref (sync->timeout_source);
+  }
   g_free (sync);
 }
 
@@ -1401,7 +1403,7 @@ update_mean_path_delay (PtpDomainData * domain, PtpPendingSync * sync)
   GST_DEBUG ("Delay request delay for domain %u: %" GST_TIME_FORMAT,
       domain->domain, GST_TIME_ARGS (delay_req_delay));
 
-#ifdef USE_MEASUREMENT_FILTERING
+#if defined(USE_MEASUREMENT_FILTERING) || defined(USE_MEDIAN_PRE_FILTERING)
 out:
 #endif
   if (g_atomic_int_get (&domain_stats_n_hooks)) {
@@ -2522,7 +2524,6 @@ gst_ptp_clock_new (const gchar * name, guint domain)
 {
   GstClock *clock;
 
-  g_return_val_if_fail (name != NULL, NULL);
   g_return_val_if_fail (domain <= G_MAXUINT8, NULL);
 
   if (!initted && !gst_ptp_init (GST_PTP_CLOCK_ID_NONE, NULL)) {