From d8b42e993b6f836f7c11baacbf6ee5dea84b67b0 Mon Sep 17 00:00:00 2001 From: Simon Berg Date: Sun, 24 Mar 2013 20:41:44 +0000 Subject: [PATCH] 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. https://bugzilla.gnome.org/show_bug.cgi?id=696411 --- gst/audiotestsrc/gstaudiotestsrc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/audiotestsrc/gstaudiotestsrc.c b/gst/audiotestsrc/gstaudiotestsrc.c index c10ca2034b..cfabbf17e9 100644 --- a/gst/audiotestsrc/gstaudiotestsrc.c +++ b/gst/audiotestsrc/gstaudiotestsrc.c @@ -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) {