summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-07-28 13:20:48 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-07-28 13:24:32 +0200
commitd95f138a4342cc1e946bbf36bbb8a054c0fd9752 (patch)
treec832c7dce01599ddcd106005697337f98fa09361
parent042c016692a434501ea85b88245df9daa4f246a3 (diff)
downloadgstreamer-plugins-base-d95f138a4342cc1e946bbf36bbb8a054c0fd9752.tar.gz
multihandlesink: 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).
-rw-r--r--gst/tcp/gstmultihandlesink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/tcp/gstmultihandlesink.c b/gst/tcp/gstmultihandlesink.c
index b8f90ba1f..721c0447f 100644
--- a/gst/tcp/gstmultihandlesink.c
+++ b/gst/tcp/gstmultihandlesink.c
@@ -1686,9 +1686,6 @@ gst_multi_handle_sink_queue_buffer (GstMultiHandleSink * mhsink,
GstMultiHandleSinkClass *mhsinkclass =
GST_MULTI_HANDLE_SINK_GET_CLASS (mhsink);
- g_get_current_time (&nowtv);
- now = GST_TIMEVAL_TO_TIME (nowtv);
-
CLIENTS_LOCK (mhsink);
/* add buffer to queue */
g_array_prepend_val (mhsink->bufqueue, buffer);
@@ -1714,6 +1711,9 @@ restart:
for (clients = mhsink->clients; clients; clients = next) {
GstMultiHandleClient *mhclient = clients->data;
+ g_get_current_time (&nowtv);
+ now = GST_TIMEVAL_TO_TIME (nowtv);
+
if (cookie != mhsink->clients_cookie) {
GST_DEBUG_OBJECT (sink, "Clients cookie outdated, restarting");
goto restart;