Merge pull request #1495 from ros-tel/mod_av_fix_parse_profile

[mod_av] FIX parse config param "profile" and "level"
This commit is contained in:
Andrey Volk 2021-12-22 16:23:43 +03:00 committed by GitHub
commit 3c28202e22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View 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")) {