avrcp: Fix not parsing all items

When using GetFolderItems to list media items it is valid to send
duplicated as they can be repeated in the list.
This commit is contained in:
Luiz Augusto von Dentz 2017-11-23 23:33:31 +02:00
parent 713518331d
commit 0f6a603184

View File

@ -2526,11 +2526,8 @@ static gboolean avrcp_list_items_rsp(struct avctp *conn, uint8_t *operands,
else
item = parse_media_folder(session, &operands[i], len);
if (item) {
if (g_slist_find(p->items, item))
goto done;
if (item)
p->items = g_slist_append(p->items, item);
}
i += len;
}