From ae7d2f8c569bf3ba6b077f3476f6ec21af9a2ee0 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Fri, 25 Jun 2004 18:50:31 +0000 Subject: [PATCH] fix wrong offsets Original commit message from CVS: fix wrong offsets --- ChangeLog | 5 +++++ gst/sine/gstsinesrc.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bef0efdcba..ec8cefc3f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-06-25 Thomas Vander Stichele + + * gst/sine/gstsinesrc.c: (gst_sinesrc_get): + fix wrong offsets + 2004-06-25 Thomas Vander Stichele * ext/alsa/gstalsasrc.c: (gst_alsa_src_init), diff --git a/gst/sine/gstsinesrc.c b/gst/sine/gstsinesrc.c index 668716c372..7d6a9c7052 100644 --- a/gst/sine/gstsinesrc.c +++ b/gst/sine/gstsinesrc.c @@ -351,7 +351,9 @@ gst_sinesrc_get (GstPad * pad) gst_element_wait (GST_ELEMENT (src), GST_BUFFER_TIMESTAMP (buf)); } } + /* offset is the number of samples */ GST_BUFFER_OFFSET (buf) = src->offset; + GST_BUFFER_OFFSET_END (buf) = src->offset + src->samples_per_buffer; GST_BUFFER_DURATION (buf) = tdiff; samples = (gint16 *) GST_BUFFER_DATA (buf); @@ -359,7 +361,7 @@ gst_sinesrc_get (GstPad * pad) GST_DPMAN_PREPROCESS (src->dpman, src->samples_per_buffer, src->timestamp); src->timestamp += tdiff; - src->offset += GST_BUFFER_SIZE (buf); + src->offset += src->samples_per_buffer; while (GST_DPMAN_PROCESS (src->dpman, i)) { #if 0