+2005-11-17 Wim Taymans <wim@fluendo.com>
+
+ * gst/net/gstnetclientclock.c: (do_linear_regression),
+ (gst_net_client_clock_do_select), (gst_net_client_clock_thread):
+ Fix compilation, uninitialized vars and a forgotten continue.
+
2005-11-17 Andy Wingo <wingo@pobox.com>
* check/Makefile.am (check_PROGRAMS):
gdouble sxx, syy, sxy, xbar, ybar;
gint i;
+ sxx = syy = sxy = xbar = ybar = 0.0;
+
/* we lose precision with the doubles, but there's no other way except to use
~80 bit arithmetic */
for (i = 0; i < n; i++) {
static gint
gst_net_client_clock_do_select (GstNetClientClock * self, fd_set * readfds)
{
- guint max_sock;
+ gint max_sock;
gint ret;
while (TRUE) {
GST_LOG_OBJECT (self, "doing select");
{
GstClockTime diff;
- GTimeVal tv;
+ GTimeVal tv, *ptv = &tv;
diff = gst_clock_get_internal_time (GST_CLOCK (self));
GST_TIME_TO_TIMEVAL (self->current_timeout, tv);
- ret = select (max_sock + 1, readfds, NULL, NULL, (struct timeval *) &tv);
+ ret = select (max_sock + 1, readfds, NULL, NULL, (struct timeval *) ptv);
diff = gst_clock_get_internal_time (GST_CLOCK (self)) - diff;
/* reset timeout */
self->current_timeout = self->timeout;
+ continue;
} else if (FD_ISSET (READ_SOCKET (self), &read_fds)) {
/* got data in */
GstClockTime new_local = gst_clock_get_internal_time (GST_CLOCK (self));
gdouble sxx, syy, sxy, xbar, ybar;
gint i;
+ sxx = syy = sxy = xbar = ybar = 0.0;
+
/* we lose precision with the doubles, but there's no other way except to use
~80 bit arithmetic */
for (i = 0; i < n; i++) {
static gint
gst_net_client_clock_do_select (GstNetClientClock * self, fd_set * readfds)
{
- guint max_sock;
+ gint max_sock;
gint ret;
while (TRUE) {
GST_LOG_OBJECT (self, "doing select");
{
GstClockTime diff;
- GTimeVal tv;
+ GTimeVal tv, *ptv = &tv;
diff = gst_clock_get_internal_time (GST_CLOCK (self));
GST_TIME_TO_TIMEVAL (self->current_timeout, tv);
- ret = select (max_sock + 1, readfds, NULL, NULL, (struct timeval *) &tv);
+ ret = select (max_sock + 1, readfds, NULL, NULL, (struct timeval *) ptv);
diff = gst_clock_get_internal_time (GST_CLOCK (self)) - diff;
/* reset timeout */
self->current_timeout = self->timeout;
+ continue;
} else if (FD_ISSET (READ_SOCKET (self), &read_fds)) {
/* got data in */
GstClockTime new_local = gst_clock_get_internal_time (GST_CLOCK (self));