Ignore:
Timestamp:
Feb 14, 2008 7:45:47 PM (15 years ago)
Author:
bennylp
Message:

Ticket #478: Handle duplicated/misordered incoming DTMF packets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/stream.c

    r1790 r1798  
    961961        return; 
    962962 
    963     /* Handle incoming DTMF. */ 
    964     if (hdr->pt == stream->rx_event_pt) { 
    965         handle_incoming_dtmf(stream, payload, payloadlen); 
    966         return; 
    967     } 
    968  
    969963    /* Update RTP session (also checks if RTP session can accept 
    970964     * the incoming packet. 
    971965     */ 
    972     pjmedia_rtp_session_update(&channel->rtp, hdr, &seq_st); 
     966    pjmedia_rtp_session_update2(&channel->rtp, hdr, &seq_st, 
     967                                hdr->pt != stream->rx_event_pt); 
    973968    if (seq_st.status.value) { 
    974969        TRC_  ((stream->port.info.name.ptr,  
     
    996991    if (payloadlen == 0) 
    997992        return; 
     993 
     994    /* Handle incoming DTMF. */ 
     995    if (hdr->pt == stream->rx_event_pt) { 
     996        /* Ignore out-of-order packet as it will be detected as new 
     997         * digit. Also ignore duplicate packet as it serves no use. 
     998         */ 
     999        if (seq_st.status.flag.outorder || seq_st.status.flag.dup) { 
     1000            return; 
     1001        } 
     1002 
     1003        handle_incoming_dtmf(stream, payload, payloadlen); 
     1004        return; 
     1005    } 
    9981006 
    9991007    /* Put "good" packet to jitter buffer, or reset the jitter buffer 
Note: See TracChangeset for help on using the changeset viewer.