From d57c9bd1bd4948f14de6b6eff1749fee41d40ec4 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Tue, 9 Feb 2021 22:28:28 +0200 Subject: [PATCH] bluez5: aac: reject MPEG4_AAC_LTP, MPEG4_AAC_SCA in select_config These modes are not actually supported by the code, so it should not accept them. --- spa/plugins/bluez5/a2dp-codec-aac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spa/plugins/bluez5/a2dp-codec-aac.c b/spa/plugins/bluez5/a2dp-codec-aac.c index 1a86e0589..d0050e862 100644 --- a/spa/plugins/bluez5/a2dp-codec-aac.c +++ b/spa/plugins/bluez5/a2dp-codec-aac.c @@ -119,9 +119,9 @@ static int codec_select_config(const struct a2dp_codec *codec, uint32_t flags, else if (conf.object_type & AAC_OBJECT_TYPE_MPEG4_AAC_LC) conf.object_type = AAC_OBJECT_TYPE_MPEG4_AAC_LC; else if (conf.object_type & AAC_OBJECT_TYPE_MPEG4_AAC_LTP) - conf.object_type = AAC_OBJECT_TYPE_MPEG4_AAC_LTP; + return -ENOTSUP; /* Not supported by FDK-AAC */ else if (conf.object_type & AAC_OBJECT_TYPE_MPEG4_AAC_SCA) - conf.object_type = AAC_OBJECT_TYPE_MPEG4_AAC_SCA; + return -ENOTSUP; /* Not supported by FDK-AAC */ else return -ENOTSUP;