mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 00:29:21 +00:00
fix audio-codec-set bug.
This commit is contained in:
parent
c1d860aa9e
commit
5d32e2a3a9
1 changed files with 5 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "audio-codec-set.h"
|
||||
|
||||
#include "private.h"
|
||||
|
||||
/*hack, until this function comes to linphonecore*/
|
||||
#define _payload_type_get_number(pt) ((long)(pt)->user_data)
|
||||
#define _payload_type_set_number(pt,n) (pt)->user_data=(void*)(long)(n)
|
||||
|
|
@ -106,10 +108,11 @@ void AudioCodecSetCommand::exec(Daemon *app, const char *args) {
|
|||
app->sendResponse(Response("New payload type number is already used.", Response::Error));
|
||||
} else {
|
||||
int idx = atoi(value.c_str());
|
||||
RtpProfile *default_profile=app->getCore()->default_profile;
|
||||
long old_idx = _payload_type_get_number(payload);
|
||||
_payload_type_set_number(payload, idx);
|
||||
rtp_profile_set_payload(&av_profile, idx, payload);
|
||||
rtp_profile_clear_payload(&av_profile, old_idx);
|
||||
rtp_profile_set_payload(default_profile, idx, payload);
|
||||
rtp_profile_clear_payload(default_profile, old_idx);
|
||||
app->sendResponse(PayloadTypeResponse(app->getCore(), payload, index));
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue