mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
rtpdtmfsrc: Correctly recognize the end of a buffer
This commit is contained in:
parent
7c55ff3023
commit
2c7257481a
1 changed files with 3 additions and 2 deletions
|
@ -605,10 +605,11 @@ gst_rtp_dtmf_prepare_buffer_data (GstRTPDTMFSrc * dtmfsrc, GstBuffer * buf)
|
||||||
|
|
||||||
/* duration of DTMF payloadfor the NEXT packet */
|
/* duration of DTMF payloadfor the NEXT packet */
|
||||||
/* not updated for redundant packets */
|
/* not updated for redundant packets */
|
||||||
if (dtmfsrc->redundancy_count == 0)
|
if (dtmfsrc->redundancy_count <= 1)
|
||||||
dtmfsrc->payload->duration += dtmfsrc->ptime * dtmfsrc->clock_rate / 1000;
|
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;
|
GstClockTime inter_digit_interval = MIN_INTER_DIGIT_INTERVAL;
|
||||||
|
|
||||||
if (inter_digit_interval % dtmfsrc->ptime != 0)
|
if (inter_digit_interval % dtmfsrc->ptime != 0)
|
||||||
|
|
Loading…
Reference in a new issue