FS-7508: parse both bw vars the same
This commit is contained in:
parent
58a8d5daa6
commit
8d3f93152e
|
@ -100,7 +100,7 @@ static switch_status_t init_codec(switch_codec_t *codec)
|
|||
if (context->codec_settings.video.bandwidth) {
|
||||
context->bandwidth = context->codec_settings.video.bandwidth;
|
||||
} else {
|
||||
context->bandwidth = context->codec_settings.video.width * context->codec_settings.video.height / 1024;
|
||||
context->bandwidth = context->codec_settings.video.width * context->codec_settings.video.height / 512;
|
||||
}
|
||||
|
||||
if (context->bandwidth > 5120) {
|
||||
|
|
|
@ -7295,6 +7295,15 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
|
|||
if (vbw) {
|
||||
int v = atoi(vbw);
|
||||
bw = v;
|
||||
|
||||
if (switch_stristr("KB", vbw)) {
|
||||
bw *= 8;
|
||||
} else if (switch_stristr("mb", vbw)) {
|
||||
bw *= 1024;
|
||||
} else if (switch_stristr("MB", vbw)) {
|
||||
bw *= 8192;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (bw > 0) {
|
||||
|
|
Loading…
Reference in New Issue