[gst-cvs] gst-plugins-base: audiotestsrc: seek to the requested byte offset, not the expected byte offset
Tim Mueller
tpm at kemper.freedesktop.org
Tue May 12 09:22:18 PDT 2009
Module: gst-plugins-base
Branch: master
Commit: 21228a693431df0c1dbf7d06bcc6f544a1abc9e0
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=21228a693431df0c1dbf7d06bcc6f544a1abc9e0
Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date: Fri May 1 01:04:48 2009 +0100
audiotestsrc: seek to the requested byte offset, not the expected byte offset
---
gst/audiotestsrc/gstaudiotestsrc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gst/audiotestsrc/gstaudiotestsrc.c b/gst/audiotestsrc/gstaudiotestsrc.c
index 17ba434..111887c 100644
--- a/gst/audiotestsrc/gstaudiotestsrc.c
+++ b/gst/audiotestsrc/gstaudiotestsrc.c
@@ -987,7 +987,7 @@ gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset,
if (offset != src->next_byte) {
GST_DEBUG_OBJECT (src, "seek to new offset %" G_GUINT64_FORMAT, offset);
/* we have a discont in the expected sample offset, do a 'seek' */
- src->next_sample = src->next_byte / (src->sample_size * src->channels);
+ src->next_sample = offset / (src->sample_size * src->channels);
src->next_time =
gst_util_uint64_scale_int (src->next_sample, GST_SECOND,
src->samplerate);
More information about the Gstreamer-commits
mailing list