mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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.
This commit is contained in:
parent
837d4b1bb9
commit
6499fcdc2e
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue