Commit d8b42e99 authored by Simon Berg's avatar Simon Berg Committed by Tim-Philipp Müller

audiotestsrc: fix buffer size of last buffer

The last buffer before EOS may be smaller than the maximum
size. The current code doesn't adjust for this, it only sets
the duration and offsets.
parent bf642ea0
......@@ -1190,6 +1190,8 @@ gst_audio_test_src_fill (GstBaseSrc * basesrc, guint64 offset,
GST_LOG_OBJECT (src, "next_sample %" G_GINT64_FORMAT ", ts %" GST_TIME_FORMAT,
next_sample, GST_TIME_ARGS (next_time));
gst_buffer_set_size (buffer, bytes);
GST_BUFFER_OFFSET (buffer) = src->next_sample;
GST_BUFFER_OFFSET_END (buffer) = next_sample;
if (!src->reverse) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment