From 2c7257481ad044c2bde230c31f91f92b24821826 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 11 Jul 2011 21:31:07 -0400 Subject: [PATCH] rtpdtmfsrc: Correctly recognize the end of a buffer --- gst/dtmf/gstrtpdtmfsrc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/dtmf/gstrtpdtmfsrc.c b/gst/dtmf/gstrtpdtmfsrc.c index 90e63fc6e1..89e8c00270 100644 --- a/gst/dtmf/gstrtpdtmfsrc.c +++ b/gst/dtmf/gstrtpdtmfsrc.c @@ -605,10 +605,11 @@ gst_rtp_dtmf_prepare_buffer_data (GstRTPDTMFSrc * dtmfsrc, GstBuffer * buf) /* duration of DTMF payloadfor the NEXT packet */ /* not updated for redundant packets */ - if (dtmfsrc->redundancy_count == 0) + if (dtmfsrc->redundancy_count <= 1) dtmfsrc->payload->duration += dtmfsrc->ptime * dtmfsrc->clock_rate / 1000; - if (dtmfsrc->redundancy_count == 0 && dtmfsrc->last_packet) { + + if (dtmfsrc->redundancy_count <= 1 && dtmfsrc->last_packet) { GstClockTime inter_digit_interval = MIN_INTER_DIGIT_INTERVAL; if (inter_digit_interval % dtmfsrc->ptime != 0) -- 2.34.1