fix wrong offsets

Original commit message from CVS:
fix wrong offsets
This commit is contained in:
Thomas Vander Stichele 2004-06-25 18:50:31 +00:00
parent 42d83d0474
commit ae7d2f8c56
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2004-06-25 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/sine/gstsinesrc.c: (gst_sinesrc_get):
fix wrong offsets
2004-06-25 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/alsa/gstalsasrc.c: (gst_alsa_src_init),

View file

@ -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