From 21228a693431df0c1dbf7d06bcc6f544a1abc9e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 1 May 2009 01:04:48 +0100 Subject: [PATCH] audiotestsrc: seek to the requested byte offset, not the expected byte offset --- gst/audiotestsrc/gstaudiotestsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/audiotestsrc/gstaudiotestsrc.c b/gst/audiotestsrc/gstaudiotestsrc.c index 17ba4347c9..111887c706 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);