Changeset 1413 for pjproject/trunk


Ignore:
Timestamp:
Aug 2, 2007 3:41:46 PM (17 years ago)
Author:
bennylp
Message:

Fixed ticket #361: Extraneous RTP packet with RFC 2833 DTMF events (thanks Pedro Sanchez)

File:
1 edited

Legend:

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

    r1266 r1413  
    387387    duration = cur_ts - digit->start_ts; 
    388388 
     389    if (duration == 0) { 
     390        PJ_LOG(5,(stream->port.info.name.ptr, "Sending DTMF digit id %c",  
     391                  digitmap[digit->event])); 
     392        duration = stream->port.info.samples_per_frame; 
     393        digit->start_ts = cur_ts - duration; 
     394    } 
     395 
    389396    event->event = (pj_uint8_t)digit->event; 
    390397    event->e_vol = 10; 
     
    409416        } 
    410417 
    411     } else if (duration == 0) { 
    412         PJ_LOG(5,(stream->port.info.name.ptr, "Sending DTMF digit id %c",  
    413                   digitmap[digit->event])); 
    414418    } 
    415419 
     
    16471651 * Set callback to be called upon receiving DTMF digits. 
    16481652 */ 
    1649 PJ_DEF(pj_status_t) 
    1650 pjmedia_stream_set_dtmf_callback(pjmedia_stream *stream, 
     1653PJ_DEF(pj_status_t) pjmedia_stream_set_dtmf_callback(pjmedia_stream *stream, 
    16511654                                 void (*cb)(pjmedia_stream*,  
    16521655                                            void *user_data,  
Note: See TracChangeset for help on using the changeset viewer.