summaryrefslogtreecommitdiffstats
path: root/stack/avrc/avrc_opt.c
diff options
context:
space:
mode:
Diffstat (limited to 'stack/avrc/avrc_opt.c')
-rwxr-xr-x[-rw-r--r--]stack/avrc/avrc_opt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/stack/avrc/avrc_opt.c b/stack/avrc/avrc_opt.c
index 208a6c223..ff791557a 100644..100755
--- a/stack/avrc/avrc_opt.c
+++ b/stack/avrc/avrc_opt.c
@@ -18,7 +18,7 @@
/******************************************************************************
*
- * nterface to AVRCP optional commands
+ * Interface to AVRCP optional commands
*
******************************************************************************/
#include <string.h>
@@ -53,8 +53,13 @@ static BT_HDR * avrc_vendor_msg(tAVRC_MSG_VENDOR *p_msg)
WC_ASSERT(p_msg != NULL);
+#if AVRC_METADATA_INCLUDED == TRUE
+ WC_ASSERT(AVRC_META_CMD_POOL_SIZE > (AVRC_MIN_CMD_LEN+p_msg->vendor_len));
+ if ((p_cmd = (BT_HDR *) GKI_getpoolbuf(AVRC_META_CMD_POOL_ID)) != NULL)
+#else
WC_ASSERT(AVRC_CMD_POOL_SIZE > (AVRC_MIN_CMD_LEN+p_msg->vendor_len));
if ((p_cmd = (BT_HDR *) GKI_getpoolbuf(AVRC_CMD_POOL_ID)) != NULL)
+#endif
{
p_cmd->offset = AVCT_MSG_OFFSET;
p_data = (UINT8 *)(p_cmd + 1) + p_cmd->offset;