osxaudio: Remove deprecated GTimeVal
authorOlivier CrĂȘte <olivier.crete@collabora.com>
Tue, 10 Dec 2019 22:13:45 +0000 (17:13 -0500)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 18 Dec 2019 19:48:34 +0000 (19:48 +0000)
sys/osxaudio/gstosxcoreaudiohal.c

index 4505c29..f649e4f 100644 (file)
@@ -619,12 +619,11 @@ _audio_stream_change_format (AudioStreamID stream_id,
    * it is also not atomic in its behaviour.
    * Therefore we check 4 times before we really give up. */
   for (i = 0; i < 4; i++) {
-    GTimeVal timeout;
+    gint64 timeout;
 
-    g_get_current_time (&timeout);
-    g_time_val_add (&timeout, 250000);
+    timeout = g_get_monotonic_time () + 250000;
 
-    if (!g_cond_wait_until (&prop_mutex.cond, &prop_mutex.lock, timeout.tv_sec)) {
+    if (!g_cond_wait_until (&prop_mutex.cond, &prop_mutex.lock, timeout)) {
       GST_LOG ("timeout...");
     }