mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
fix wrong offsets
Original commit message from CVS: fix wrong offsets
This commit is contained in:
parent
42d83d0474
commit
ae7d2f8c56
2 changed files with 8 additions and 1 deletions
|
@ -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>
|
2004-06-25 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* ext/alsa/gstalsasrc.c: (gst_alsa_src_init),
|
* ext/alsa/gstalsasrc.c: (gst_alsa_src_init),
|
||||||
|
|
|
@ -351,7 +351,9 @@ gst_sinesrc_get (GstPad * pad)
|
||||||
gst_element_wait (GST_ELEMENT (src), GST_BUFFER_TIMESTAMP (buf));
|
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 (buf) = src->offset;
|
||||||
|
GST_BUFFER_OFFSET_END (buf) = src->offset + src->samples_per_buffer;
|
||||||
GST_BUFFER_DURATION (buf) = tdiff;
|
GST_BUFFER_DURATION (buf) = tdiff;
|
||||||
|
|
||||||
samples = (gint16 *) GST_BUFFER_DATA (buf);
|
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);
|
GST_DPMAN_PREPROCESS (src->dpman, src->samples_per_buffer, src->timestamp);
|
||||||
|
|
||||||
src->timestamp += tdiff;
|
src->timestamp += tdiff;
|
||||||
src->offset += GST_BUFFER_SIZE (buf);
|
src->offset += src->samples_per_buffer;
|
||||||
|
|
||||||
while (GST_DPMAN_PROCESS (src->dpman, i)) {
|
while (GST_DPMAN_PROCESS (src->dpman, i)) {
|
||||||
#if 0
|
#if 0
|
||||||
|
|
Loading…
Reference in a new issue