gst/: Use the segment->last_stop value to calculate the next timestamp to generate...
authorMichael Smith <msmith@xiph.org>
Thu, 17 May 2007 11:16:14 +0000 (11:16 +0000)
committerMichael Smith <msmith@xiph.org>
Thu, 17 May 2007 11:16:14 +0000 (11:16 +0000)
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.

ChangeLog
gst/audiotestsrc/gstaudiotestsrc.c
gst/videotestsrc/gstvideotestsrc.c

index 39626cf..6a4989d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-17  Michael Smith <msmith@fluendo.com>
+
+       * 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.
+
 2007-05-15  David Schleef  <ds@schleef.org>
 
        * docs/Makefile.am: Install docs even when --disable-gtk-doc
index 7fed0c7..4308fcb 100644 (file)
@@ -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;
index 1bb3998..e78ddcf 100644 (file)
@@ -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) {