From 692fd81ac71c2407885fe85e579817b8381792da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 28 Jul 2013 13:23:41 +0200 Subject: [PATCH] multifdsink: Update current time after every write Each write will update the last_activity_time and otherwise we would compare against a too old current time and immediately timeout because current time is smaller than last activity time (overflow). --- gst/tcp/gstmultifdsink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/tcp/gstmultifdsink.c b/gst/tcp/gstmultifdsink.c index 87e540c..5f5f884 100644 --- a/gst/tcp/gstmultifdsink.c +++ b/gst/tcp/gstmultifdsink.c @@ -685,15 +685,15 @@ gst_multi_fd_sink_handle_client_write (GstMultiFdSink * sink, GstMultiHandleClient *mhclient = (GstMultiHandleClient *) client; int fd = mhclient->handle.fd; - g_get_current_time (&nowtv); - now = GST_TIMEVAL_TO_TIME (nowtv); - flushing = mhclient->status == GST_CLIENT_STATUS_FLUSHING; more = TRUE; do { gint maxsize; + g_get_current_time (&nowtv); + now = GST_TIMEVAL_TO_TIME (nowtv); + if (!mhclient->sending) { /* client is not working on a buffer */ if (mhclient->bufpos == -1) { -- 2.7.4