multifdsink: only keep last valid timestamp

Fixes #634397
This commit is contained in:
Wim Taymans 2010-12-29 12:53:36 +01:00
parent c41a4d0df4
commit b1696cf21d

View file

@ -2052,6 +2052,7 @@ gst_multi_fd_sink_handle_client_write (GstMultiFdSink * sink,
} else { } else {
/* client can pick a buffer from the global queue */ /* client can pick a buffer from the global queue */
GstBuffer *buf; GstBuffer *buf;
GstClockTime timestamp;
/* for new connections, we need to find a good spot in the /* for new connections, we need to find a good spot in the
* bufqueue to start streaming from */ * bufqueue to start streaming from */
@ -2078,10 +2079,11 @@ gst_multi_fd_sink_handle_client_write (GstMultiFdSink * sink,
client->bufpos--; client->bufpos--;
/* update stats */ /* update stats */
timestamp = GST_BUFFER_TIMESTAMP (buf);
if (client->first_buffer_ts == GST_CLOCK_TIME_NONE) if (client->first_buffer_ts == GST_CLOCK_TIME_NONE)
client->first_buffer_ts = GST_BUFFER_TIMESTAMP (buf); client->first_buffer_ts = timestamp;
client->last_buffer_ts = GST_BUFFER_TIMESTAMP (buf); if (timestamp != -1)
client->last_buffer_ts = timestamp;
/* decrease flushcount */ /* decrease flushcount */
if (client->flushcount != -1) if (client->flushcount != -1)