Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Browse files Browse the repository at this point in the history
… fixup! fixup! fixup! fixup! more logging, narrowed to conf switch
  • Loading branch information
ecolsen7 committed Mar 6, 2024
1 parent b479814 commit 4cf1eda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions pjsip/src/pjsua-lib/pjsua_aud.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ pj_status_t pjsua_aud_subsys_destroy()
if (pjsua_var.player[i].port) {
PJ_LOG(2,(THIS_FILE, "Destructor for player id=%d "
"is not called", i));
PJ_LOG(2, (THIS_FILE, "pjsua_player_destroy 1"));
pjsua_player_destroy(i);
}
}
Expand Down
5 changes: 5 additions & 0 deletions pjsip/src/pjsua2/media.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ AudioMediaPlayer::~AudioMediaPlayer()
{
if (playerId != PJSUA_INVALID_ID) {
unregisterMediaPort();
PJ_LOG(2, (THIS_FILE, "pjsua_player_destroy 2"));
pjsua_player_destroy(playerId);
}
}
Expand All @@ -300,12 +301,14 @@ void AudioMediaPlayer::createPlayer(const string &file_name,

status = pjsua_player_get_port(playerId, &port);
if (status != PJ_SUCCESS) {
PJ_LOG(2, (THIS_FILE, "pjsua_player_destroy 3"));
pjsua_player_destroy(playerId);
PJSUA2_RAISE_ERROR2(status, "AudioMediaPlayer::createPlayer()");
}
status = pjmedia_wav_player_set_eof_cb2(port, this, &eof_cb);
if (status != PJ_SUCCESS) {
pjsua_player_destroy(playerId);
PJ_LOG(2, (THIS_FILE, "pjsua_player_destroy 4"));
PJSUA2_RAISE_ERROR2(status, "AudioMediaPlayer::createPlayer()");
}

Expand Down Expand Up @@ -348,11 +351,13 @@ void AudioMediaPlayer::createPlaylist(const StringVector &file_names,
pjmedia_port *port;
status = pjsua_player_get_port(playerId, &port);
if (status != PJ_SUCCESS) {
PJ_LOG(2, (THIS_FILE, "pjsua_player_destroy 5"));
pjsua_player_destroy(playerId);
PJSUA2_RAISE_ERROR2(status, "AudioMediaPlayer::createPlaylist()");
}
status = pjmedia_wav_playlist_set_eof_cb2(port, this, &eof_cb);
if (status != PJ_SUCCESS) {
PJ_LOG(2, (THIS_FILE, "pjsua_player_destroy 6"));
pjsua_player_destroy(playerId);
PJSUA2_RAISE_ERROR2(status, "AudioMediaPlayer::createPlaylist()");
}
Expand Down

0 comments on commit 4cf1eda

Please sign in to comment.