Ignore:
Timestamp:
Dec 6, 2010 4:25:44 AM (12 years ago)
Author:
bennylp
Message:

Fixed #1160: Option to bypass RTP payload type verification in the stream (thanks Johan Lantz for the suggestion)

File:
1 edited

Legend:

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

    r3313 r3387  
    15741574    unsigned payloadlen; 
    15751575    pjmedia_rtp_status seq_st; 
     1576    pj_bool_t check_pt; 
    15761577    pj_status_t status; 
    15771578    pj_bool_t pkt_discarded = PJ_FALSE; 
     
    16031604     * the incoming packet. 
    16041605     */ 
    1605     pjmedia_rtp_session_update2(&channel->rtp, hdr, &seq_st, 
    1606                                 hdr->pt != stream->rx_event_pt); 
     1606    check_pt = (hdr->pt != stream->rx_event_pt) && PJMEDIA_STREAM_CHECK_RTP_PT; 
     1607    pjmedia_rtp_session_update2(&channel->rtp, hdr, &seq_st, check_pt); 
     1608#if !PJMEDIA_STREAM_CHECK_RTP_PT 
     1609    if (!check_pt && hdr->pt != channel->rtp.out_pt && 
     1610        hdr->pt != stream->rx_event_pt) 
     1611    { 
     1612        seq_st.status.flag.badpt = 1; 
     1613    } 
     1614#endif 
    16071615    if (seq_st.status.value) { 
    16081616        TRC_  ((stream->port.info.name.ptr,  
Note: See TracChangeset for help on using the changeset viewer.