Commit 6499fcdc authored by Michael Smith's avatar Michael Smith
Browse files

gst/audiotestsrc/gstaudiotestsrc.c: Don't overflow intermediate values when...

gst/audiotestsrc/gstaudiotestsrc.c: Don't overflow intermediate values when seeking to large time values in audiotest...

Original commit message from CVS:
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_do_seek):
Don't overflow intermediate values when seeking to large time values
in audiotestsrc.
parent 837d4b1b
2007-06-01 Michael Smith <msmith@fluendo.com>
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_do_seek):
Don't overflow intermediate values when seeking to large time values
in audiotestsrc.
2007-06-05 Wim Taymans <wim@fluendo.com>
 
* gst/playback/gstqueue2.c: (gst_queue_have_data),
......@@ -611,14 +611,17 @@ gst_audio_test_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment)
time = segment->last_stop;
/* now move to the time indicated */
src->n_samples = time * src->samplerate / GST_SECOND;
src->running_time = src->n_samples * GST_SECOND / src->samplerate;
src->n_samples =
gst_util_uint64_scale_int (time, src->samplerate, GST_SECOND);
src->running_time =
gst_util_uint64_scale_int (src->n_samples, GST_SECOND, src->samplerate);
g_assert (src->running_time <= time);
if (GST_CLOCK_TIME_IS_VALID (segment->stop)) {
time = segment->stop;
src->n_samples_stop = time * src->samplerate / GST_SECOND;
src->n_samples_stop = gst_util_uint64_scale_int (time, src->samplerate,
GST_SECOND);
src->check_seek_stop = TRUE;
} else {
src->check_seek_stop = FALSE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment