From fbde258be6b3c3b02e051cc5c8ca649570a65b3a Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Sat, 21 May 2011 16:16:42 +0300 Subject: [PATCH] baseaudiosink: use gst_util_uint64_scale_int when appropriate It's probably safer this way. --- gst-libs/gst/audio/gstbaseaudiosink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstbaseaudiosink.c b/gst-libs/gst/audio/gstbaseaudiosink.c index 837b11e600..c3553da522 100644 --- a/gst-libs/gst/audio/gstbaseaudiosink.c +++ b/gst-libs/gst/audio/gstbaseaudiosink.c @@ -1427,7 +1427,8 @@ gst_base_audio_sink_get_alignment (GstBaseAudioSink * sink, diff = sink->next_sample - sample_offset; /* calculate the max allowed drift in units of samples. */ - maxdrift = (ringbuf->spec.rate * sink->priv->alignment_threshold) / GST_MSECOND; + max_sample_diff = gst_util_uint64_scale_int (sink->priv->alignment_threshold, + ringbuf->spec.rate, GST_SECOND); /* calc align with previous sample */ align = sink->next_sample - sample_offset;