aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2024-02-12 20:02:37 +0000
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-02-12 17:35:32 -0500
commitf2671bf8f951c84fbdd0c463c64c9aa3299a7e9a (patch)
tree01d3a7b0f7c5ece284b11329f8bd2f4eac2c540d
parent41c7f3af0352d3e45f4f10b7584e955a7f5cc696 (diff)
Return at least the title attribute from player_list_metadata()
This fixes Bluetooth AVRCP certification test AVRCP/TG/MDI/BV-04-C, which requires a valid response from the get_element_attributes command.
-rw-r--r--profiles/audio/avrcp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 439fa27a91..36ce01a14e 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -1210,6 +1210,10 @@ static GList *player_list_metadata(struct avrcp_player *player)
GUINT_TO_POINTER(str_to_metadata(key)));
}
+ if (attrs == NULL)
+ return g_list_prepend(NULL,
+ GUINT_TO_POINTER(AVRCP_MEDIA_ATTRIBUTE_TITLE));
+
return attrs;
}