From b1696cf21d5400095a4371c351f485c30f7cbd3a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 29 Dec 2010 12:53:36 +0100 Subject: [PATCH] multifdsink: only keep last valid timestamp Fixes #634397 --- gst/tcp/gstmultifdsink.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gst/tcp/gstmultifdsink.c b/gst/tcp/gstmultifdsink.c index f72bfff4dd..4072eefb87 100644 --- a/gst/tcp/gstmultifdsink.c +++ b/gst/tcp/gstmultifdsink.c @@ -2052,6 +2052,7 @@ gst_multi_fd_sink_handle_client_write (GstMultiFdSink * sink, } else { /* client can pick a buffer from the global queue */ GstBuffer *buf; + GstClockTime timestamp; /* for new connections, we need to find a good spot in the * bufqueue to start streaming from */ @@ -2078,10 +2079,11 @@ gst_multi_fd_sink_handle_client_write (GstMultiFdSink * sink, client->bufpos--; /* update stats */ + timestamp = GST_BUFFER_TIMESTAMP (buf); if (client->first_buffer_ts == GST_CLOCK_TIME_NONE) - client->first_buffer_ts = GST_BUFFER_TIMESTAMP (buf); - client->last_buffer_ts = GST_BUFFER_TIMESTAMP (buf); - + client->first_buffer_ts = timestamp; + if (timestamp != -1) + client->last_buffer_ts = timestamp; /* decrease flushcount */ if (client->flushcount != -1)