Browse Source

MT#55283 skip creation of single-item lists

The function in charge of processing codec flags can already handle
standalone string values and doesn't require a list to wrap single
strings.

Change-Id: Id9bc97d455c75a3d1b0a19c5dbe43f677c937401
rfuchs/gh1842
Richard Fuchs 1 year ago
parent
commit
89573be718
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      daemon/control_ng_flags_parser.c

+ 1
- 4
daemon/control_ng_flags_parser.c View File

@ -150,7 +150,6 @@ static bool parse_codec_to_dict(str * key, str * val, const char *cmp1, const ch
enum call_opmode opmode)
{
str s;
bencode_item_t * dictp;
if(!str_key_val_prefix(key, cmp1, val, &s)) {
if(!cmp2)
@ -159,9 +158,7 @@ static bool parse_codec_to_dict(str * key, str * val, const char *cmp1, const ch
return false;
}
dictp = bencode_list(buf);
bencode_list_add_str(dictp, &s);
call_ng_codec_flags(out, &STR_INIT(dictstr), dictp, opmode);
call_ng_codec_flags(out, &STR_INIT(dictstr), bencode_str(buf, &s), opmode);
return true;
}


Loading…
Cancel
Save