summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorMichael Smith <msmith@xiph.org>2007-05-17 11:16:14 +0000
committerMichael Smith <msmith@xiph.org>2007-05-17 11:16:14 +0000
commitab76fa091a8b312809cabeebe44e7ecae8b27744 (patch)
tree2effeb2565433e7c8e733356970506c5633a0813 /gst
parentbd9d834bd898af19e68ad66218b7814cd3d9ae1f (diff)
gst/: Use the segment->last_stop value to calculate the next timestamp to generate after a seek; not the segment->sta...
Original commit message from CVS: * gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_do_seek): * gst/videotestsrc/gstvideotestsrc.c: (gst_video_test_src_do_seek): Use the segment->last_stop value to calculate the next timestamp to generate after a seek; not the segment->start value.
Diffstat (limited to 'gst')
-rw-r--r--gst/audiotestsrc/gstaudiotestsrc.c3
-rw-r--r--gst/videotestsrc/gstvideotestsrc.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/gst/audiotestsrc/gstaudiotestsrc.c b/gst/audiotestsrc/gstaudiotestsrc.c
index 7fed0c7aa..4308fcb25 100644
--- a/gst/audiotestsrc/gstaudiotestsrc.c
+++ b/gst/audiotestsrc/gstaudiotestsrc.c
@@ -607,7 +607,8 @@ gst_audio_test_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment)
GstAudioTestSrc *src = GST_AUDIO_TEST_SRC (basesrc);
GstClockTime time;
- time = segment->time = segment->start;
+ segment->time = segment->start;
+ time = segment->last_stop;
/* now move to the time indicated */
src->n_samples = time * src->samplerate / GST_SECOND;
diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c
index 1bb3998d3..e78ddcf1a 100644
--- a/gst/videotestsrc/gstvideotestsrc.c
+++ b/gst/videotestsrc/gstvideotestsrc.c
@@ -497,7 +497,8 @@ gst_video_test_src_do_seek (GstBaseSrc * bsrc, GstSegment * segment)
src = GST_VIDEO_TEST_SRC (bsrc);
- time = segment->time = segment->start;
+ segment->time = segment->start;
+ time = segment->last_stop;
/* now move to the time indicated */
if (src->rate_numerator) {