pipewire: properties: copy sorted flag from dictionary

This commit is contained in:
Barnabás Pőcze 2021-06-12 15:05:33 +02:00
parent b04bffa5a9
commit ab4de7733f

View file

@ -121,6 +121,8 @@ struct pw_properties *pw_properties_new(const char *key, ...)
* *
* \param dict a dictionary. keys and values are copied * \param dict a dictionary. keys and values are copied
* \return a new properties object * \return a new properties object
*
* `SPA_DICT_FLAG_SORTED` is copied if present on \a dict.
*/ */
SPA_EXPORT SPA_EXPORT
struct pw_properties *pw_properties_new_dict(const struct spa_dict *dict) struct pw_properties *pw_properties_new_dict(const struct spa_dict *dict)
@ -138,6 +140,9 @@ struct pw_properties *pw_properties_new_dict(const struct spa_dict *dict)
strdup(it->value)); strdup(it->value));
} }
SPA_FLAG_UPDATE(impl->this.dict.flags, SPA_DICT_FLAG_SORTED,
SPA_FLAG_IS_SET(dict->flags, SPA_DICT_FLAG_SORTED));
return &impl->this; return &impl->this;
} }