netclientclock: fix timestamp comparission, Fixes #597407

This commit is contained in:
Tommi Myöhänen 2009-10-13 19:12:50 +03:00 committed by Stefan Kost
parent ffb8518d01
commit 87058ab28e

View file

@ -557,8 +557,10 @@ gst_net_client_clock_new (gchar * name, const gchar * remote_address,
{ {
GstClockTime now = gst_clock_get_time (GST_CLOCK (ret)); GstClockTime now = gst_clock_get_time (GST_CLOCK (ret));
if (now < base_time || now > base_time + GST_SECOND) if (GST_CLOCK_DIFF (now, base_time) > 0 ||
GST_CLOCK_DIFF (now, base_time + GST_SECOND) < 0) {
g_warning ("unable to set the base time, expect sync problems!"); g_warning ("unable to set the base time, expect sync problems!");
}
} }
if ((ret->priv->fdset = gst_poll_new (TRUE)) == NULL) if ((ret->priv->fdset = gst_poll_new (TRUE)) == NULL)