mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
* #21507: daemon: get audio codec names from audiortpfactory, not SDP
This fixes the race-condition + SEGFAULT
This commit is contained in:
@ -95,7 +95,7 @@ SIPCall::createHistoryEntry() const
|
||||
using sfl::HistoryItem;
|
||||
|
||||
std::map<std::string, std::string> entry(Call::createHistoryEntry());
|
||||
entry[HistoryItem::AUDIO_CODEC_KEY] = local_sdp_->getAudioCodecNames();
|
||||
entry[HistoryItem::AUDIO_CODEC_KEY] = audiortp_.getCurrentAudioCodecNames();
|
||||
#ifdef SFL_VIDEO
|
||||
entry[HistoryItem::VIDEO_CODEC_KEY] = local_sdp_->getSessionVideoCodec();
|
||||
#endif
|
||||
|
@ -1342,7 +1342,12 @@ SIPVoIPLink::getCurrentVideoCodecName(Call *call) const
|
||||
std::string
|
||||
SIPVoIPLink::getCurrentAudioCodecNames(Call *call) const
|
||||
{
|
||||
return static_cast<SIPCall*>(call)->getLocalSDP()->getAudioCodecNames();
|
||||
try {
|
||||
return static_cast<SIPCall*>(call)->getAudioRtp().getCurrentAudioCodecNames();
|
||||
} catch (const AudioRtpFactoryException &e) {
|
||||
ERROR("%s", e.what());
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/* Only use this macro with string literals or character arrays, will not work
|
||||
|
Reference in New Issue
Block a user