speexenc: do not use invalid buffer timestamps

This commit is contained in:
Vincent Penquerc'h 2011-09-19 09:37:58 +02:00 committed by Sebastian Dröge
parent 8ca420f547
commit 7e4574e968

View file

@ -1050,6 +1050,7 @@ gst_speex_enc_chain (GstPad * pad, GstBuffer * buf)
/* Check if we have a continous stream, if not drop some samples or the buffer or /* Check if we have a continous stream, if not drop some samples or the buffer or
* insert some silence samples */ * insert some silence samples */
if (enc->next_ts != GST_CLOCK_TIME_NONE && if (enc->next_ts != GST_CLOCK_TIME_NONE &&
GST_BUFFER_TIMESTAMP_IS_VALID (buf) &&
GST_BUFFER_TIMESTAMP (buf) < enc->next_ts) { GST_BUFFER_TIMESTAMP (buf) < enc->next_ts) {
guint64 diff = enc->next_ts - GST_BUFFER_TIMESTAMP (buf); guint64 diff = enc->next_ts - GST_BUFFER_TIMESTAMP (buf);
guint64 diff_bytes; guint64 diff_bytes;