diff --git a/ChangeLog b/ChangeLog index 3c0aa928b4..4253064e27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-05-03 Michael Smith + + * gst/audiorate/gstaudiorate.c: (gst_audio_rate_chain): + If a buffer doesn't have a timestamp, assume it's contiguous with + the previous buffer, and synthesise timestamps appropriately. + 2007-05-03 Edward Hervey * tests/check/elements/videorate.c: (GST_START_TEST): diff --git a/gst/audiorate/gstaudiorate.c b/gst/audiorate/gstaudiorate.c index 6d5452eda3..5b8125c2f5 100644 --- a/gst/audiorate/gstaudiorate.c +++ b/gst/audiorate/gstaudiorate.c @@ -510,6 +510,11 @@ gst_audio_rate_chain (GstPad * pad, GstBuffer * buf) audiorate->in++; in_time = GST_BUFFER_TIMESTAMP (buf); + if (in_time == GST_CLOCK_TIME_NONE) { + GST_DEBUG_OBJECT (audiorate, "no timestamp, using expected next time"); + in_time = audiorate->next_ts; + } + in_size = GST_BUFFER_SIZE (buf); in_samples = in_size / audiorate->bytes_per_sample; /* get duration from the size because we can and it's more accurate */