}
/* get number of channels from caps */
gst_structure_get_int(ins, "channels", &channels);
- audioeq->channels = (gshort)channels;
+ audioeq->channels = (guint)channels;
if ((old_samplerate != audioeq->samplerate)
|| (old_channels != audioeq->channels)) {
/* quickly go to the min value when we are filling up, slowly when we are
* just starting because we're not sure it's a good value yet. */
jbuf->skew =
- (perc * jbuf->window_min + ((10000 - perc) * jbuf->skew)) / 10000;
+ (perc * jbuf->window_min + ((10000 - (gint64)perc) * jbuf->skew)) / 10000;
jbuf->window_size = pos + 1;
}
} else {
jbuf->mode != WFD_RTP_BUFFER_MODE_SLAVE &&
jbuf->base_time != -1 && jbuf->last_rtptime != -1) {
GstClockTime ext_rtptime = jbuf->ext_rtptime;
+ guint64 multiplied_clock_rate = 3 * (guint64)jbuf->clock_rate;
ext_rtptime = gst_rtp_buffer_ext_timestamp (&ext_rtptime, rtptime);
- if (ext_rtptime > jbuf->last_rtptime + 3 * jbuf->clock_rate ||
- ext_rtptime + 3 * jbuf->clock_rate < jbuf->last_rtptime) {
+ if (ext_rtptime > jbuf->last_rtptime + multiplied_clock_rate ||
+ ext_rtptime + multiplied_clock_rate < jbuf->last_rtptime) {
/* reset even if we don't have valid incoming time;
* still better than producing possibly very bogus output timestamp */
GST_WARNING ("rtp delta too big, reset skew");
/* quickly go to the min value when we are filling up, slowly when we are
* just starting because we're not sure it's a good value yet. */
pcr->skew =
- (perc * pcr->window_min + ((10000 - perc) * pcr->skew)) / 10000;
+ (perc * pcr->window_min + ((10000 - (gint64)perc) * pcr->skew)) / 10000;
pcr->window_size = pos + 1;
}
} else {