From ad20119652a8817fab97550118732afdb32f273f Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 20 Apr 2015 15:34:29 -0500 Subject: [PATCH] FS-7503: add vb param for vid bitrate --- src/switch_core_file.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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) {