mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
FS-7500: make video bandwidth accurate for vpx
This commit is contained in:
parent
93db69ed03
commit
f8729d5440
@ -137,13 +137,13 @@ static switch_status_t init_encoder(switch_codec_t *codec)
|
||||
}
|
||||
|
||||
if (context->codec_settings.video.bandwidth) {
|
||||
context->bandwidth = context->codec_settings.video.bandwidth;
|
||||
context->bandwidth = context->codec_settings.video.bandwidth * 4;
|
||||
} else {
|
||||
context->bandwidth = context->codec_settings.video.width * context->codec_settings.video.height / 512;
|
||||
context->bandwidth = ((context->codec_settings.video.width * context->codec_settings.video.height) / 900) * 4;
|
||||
}
|
||||
|
||||
if (context->bandwidth > 5120) {
|
||||
context->bandwidth = 5120;
|
||||
if (context->bandwidth > 40960) {
|
||||
context->bandwidth = 40960;
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(codec->session), SWITCH_LOG_NOTICE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user