GST_TIME_ARGS (padprivate->next_timestamp),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
- padprivate->next_timestamp = GST_BUFFER_TIMESTAMP (buffer) +
- GST_BUFFER_DURATION (buffer);
+ if ( GST_BUFFER_DURATION_IS_VALID(buffer))
+ padprivate->next_timestamp = GST_BUFFER_TIMESTAMP (buffer) +
+ GST_BUFFER_DURATION (buffer);
+ else
+ padprivate->next_timestamp = GST_CLOCK_TIME_NONE;
buffer = gst_buffer_make_metadata_writable (buffer);
goto again;
if (GST_CLOCK_TIME_IS_VALID (adder->next_timestamp) &&
- GST_BUFFER_TIMESTAMP (buffer) != adder->next_timestamp)
- {
+ GST_BUFFER_TIMESTAMP (buffer) != adder->next_timestamp) {
if (llabs (GST_BUFFER_TIMESTAMP (buffer) - adder->next_timestamp) <
GST_SECOND / adder->rate) {
GST_BUFFER_TIMESTAMP (buffer) = adder->next_timestamp;
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
}
} else {
- GST_DEBUG_OBJECT (adder, "Continuous buffer");
GST_BUFFER_FLAG_UNSET(buffer, GST_BUFFER_FLAG_DISCONT);
}
GST_BUFFER_OFFSET(buffer) = GST_BUFFER_OFFSET_NONE;
GST_BUFFER_OFFSET_END(buffer) = GST_BUFFER_OFFSET_NONE;
- adder->next_timestamp = GST_BUFFER_TIMESTAMP (buffer) +
- GST_BUFFER_DURATION (buffer);
+ if (GST_BUFFER_DURATION_IS_VALID (buffer))
+ adder->next_timestamp = GST_BUFFER_TIMESTAMP (buffer) +
+ GST_BUFFER_DURATION (buffer);
+ else
+ adder->next_timestamp = GST_CLOCK_TIME_NONE;
if (adder->segment_pending)
{