summaryrefslogtreecommitdiff
path: root/audio/gstavdtpsink.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2009-03-19 16:16:19 -0300
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2009-03-25 18:56:20 -0300
commitc5e75a5051967530f29f9fabfb8593ef2723d57e (patch)
tree7aaacfce7d767b3a4bb8feef2bd0b6fd1f684190 /audio/gstavdtpsink.c
parentbd30e5535a6d713727f8f9433954dcb9dd4b7168 (diff)
downloadbluez-c5e75a5051967530f29f9fabfb8593ef2723d57e.tar.gz
Add lock flag for capabilities.
lock flag permits the unix client to detect if there is someone holding the lock so it can prevent useless attempt of setting a new configuration.
Diffstat (limited to 'audio/gstavdtpsink.c')
-rw-r--r--audio/gstavdtpsink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/gstavdtpsink.c b/audio/gstavdtpsink.c
index ec997f232..eb15f0819 100644
--- a/audio/gstavdtpsink.c
+++ b/audio/gstavdtpsink.c
@@ -250,7 +250,8 @@ static codec_capabilities_t *gst_avdtp_find_caps(GstAvdtpSink *sink,
int bytes_left = rsp->h.length - sizeof(*rsp);
while (bytes_left > 0) {
- if (codec->type == codec_type)
+ if ((codec->type == codec_type) &&
+ !(codec->lock & BT_WRITE_LOCK))
break;
bytes_left -= codec->length;