From: Anthony Minessale Date: Mon, 20 Apr 2015 20:34:29 +0000 (-0500) Subject: FS-7503: add vb param for vid bitrate X-Git-Tag: v1.6.2~614^2~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad20119652a8817fab97550118732afdb32f273f;p=thirdparty%2Ffreeswitch.git FS-7503: add vb param for vid bitrate --- diff --git a/src/switch_core_file.c b/src/switch_core_file.c index f8026c31ea..1ed96db3d3 100644 --- a/src/switch_core_file.c +++ b/src/switch_core_file.c @@ -137,6 +137,19 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file, } } + + if ((val = switch_event_get_header(fh->params, "vb"))) { + tmp = atoi(val); + + if (strrchr(val, 'k')) { + tmp *= 1024; + } else if (strrchr(val, 'm')) { + tmp *= 1048576; + } + + fh->mm.vb = tmp; + } + if ((val = switch_event_get_header(fh->params, "vw"))) { tmp = atoi(val); if (tmp > 0) {