]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_av] FIX parse config param "profile" and "level" 1495/head
authorros-tel <vladvladow@yandex.ru>
Wed, 22 Dec 2021 12:32:59 +0000 (17:32 +0500)
committerros-tel <vladvladow@yandex.ru>
Wed, 22 Dec 2021 12:32:59 +0000 (17:32 +0500)
src/mod/applications/mod_av/avcodec.c

index 573b8baaa161ea5c53256b313caa2fa592ecfdf9..703dc1b2ce3f4e6fbdecfb10739a9252e9bbd4c1 100644 (file)
@@ -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")) {