From ab4de7733f099b4d0fb1ed08bcf9151bd702b143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sat, 12 Jun 2021 15:05:33 +0200 Subject: [PATCH] pipewire: properties: copy sorted flag from dictionary --- src/pipewire/properties.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pipewire/properties.c b/src/pipewire/properties.c index 4543005b8..4975d755d 100644 --- a/src/pipewire/properties.c +++ b/src/pipewire/properties.c @@ -121,6 +121,8 @@ struct pw_properties *pw_properties_new(const char *key, ...) * * \param dict a dictionary. keys and values are copied * \return a new properties object + * + * `SPA_DICT_FLAG_SORTED` is copied if present on \a dict. */ SPA_EXPORT 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)); } + SPA_FLAG_UPDATE(impl->this.dict.flags, SPA_DICT_FLAG_SORTED, + SPA_FLAG_IS_SET(dict->flags, SPA_DICT_FLAG_SORTED)); + return &impl->this; }