Commit 930bfe3c authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

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).
parent 43093743
......@@ -1691,9 +1691,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);
......@@ -1719,6 +1716,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment