From: ros-tel Date: Wed, 22 Dec 2021 12:32:59 +0000 (+0500) Subject: [mod_av] FIX parse config param "profile" and "level" X-Git-Tag: v1.10.8^2~98^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1495%2Fhead;p=thirdparty%2Ffreeswitch.git [mod_av] FIX parse config param "profile" and "level" --- diff --git a/src/mod/applications/mod_av/avcodec.c b/src/mod/applications/mod_av/avcodec.c index 573b8baaa1..703dc1b2ce 100644 --- a/src/mod/applications/mod_av/avcodec.c +++ b/src/mod/applications/mod_av/avcodec.c @@ -1979,6 +1979,9 @@ static void parse_profile(avcodec_profile_t *aprofile, switch_xml_t profile) ctx = &aprofile->ctx; + ctx->profile = FF_PROFILE_H264_BASELINE; + ctx->level = 31; + for (param = switch_xml_child(profile, "param"); param; param = param->next) { const char *name = switch_xml_attr(param, "name"); const char *value = switch_xml_attr(param, "value"); @@ -1990,9 +1993,6 @@ static void parse_profile(avcodec_profile_t *aprofile, switch_xml_t profile) val = atoi(value); - ctx->profile = FF_PROFILE_H264_BASELINE; - ctx->level = 31; - if (!strcmp(name, "dec-threads")) { aprofile->decoder_thread_count = switch_parse_cpu_string(value); } else if (!strcmp(name, "enc-threads")) {