Ignore:
Timestamp:
Jan 21, 2014 10:59:25 AM (8 years ago)
Author:
nanang
Message:

Re #1519 [into SVN trunk]: AudioMedia? objects must not be destroyed before unregistered from conf bridge.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua2/media.cpp

    r4704 r4708  
    248248AudioMediaPlayer::~AudioMediaPlayer() 
    249249{ 
    250     if (playerId != PJSUA_INVALID_ID) 
     250    if (playerId != PJSUA_INVALID_ID) { 
     251        unregisterMediaPort(); 
    251252        pjsua_player_destroy(playerId); 
     253    } 
    252254} 
    253255 
     
    256258                                    throw(Error) 
    257259{ 
     260    if (playerId != PJSUA_INVALID_ID) { 
     261        PJSUA2_RAISE_ERROR(PJ_EEXISTS); 
     262    } 
     263 
    258264    pj_str_t pj_name = str2Pj(file_name); 
    259265 
     
    273279                                      throw(Error) 
    274280{ 
     281    if (playerId != PJSUA_INVALID_ID) { 
     282        PJSUA2_RAISE_ERROR(PJ_EEXISTS); 
     283    } 
     284 
    275285    pj_str_t pj_files[MAX_FILE_NAMES]; 
    276286    unsigned i, count = 0; 
     
    318328AudioMediaRecorder::~AudioMediaRecorder() 
    319329{ 
    320     if (recorderId != PJSUA_INVALID_ID) 
     330    if (recorderId != PJSUA_INVALID_ID) { 
     331        unregisterMediaPort(); 
    321332        pjsua_recorder_destroy(recorderId); 
     333    } 
    322334} 
    323335 
     
    329341{ 
    330342    PJ_UNUSED_ARG(max_size); 
     343 
     344    if (recorderId != PJSUA_INVALID_ID) { 
     345        PJSUA2_RAISE_ERROR(PJ_EEXISTS); 
     346    } 
    331347 
    332348    pj_str_t pj_name = str2Pj(file_name); 
Note: See TracChangeset for help on using the changeset viewer.