summaryrefslogtreecommitdiffstats
path: root/audio/unix.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-10-23 09:59:27 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-10-23 09:59:27 +0000
commitcc791a620f77ab090ec5f7cb6977769465c83b80 (patch)
tree55c6af124b8c2b4f47098aeb8abf7ab7ad542f69 /audio/unix.c
parent4b45ea5d70f9699fd435120ff860373630c87a42 (diff)
Fix unaligned access to ipc_data_cfg struct
Diffstat (limited to 'audio/unix.c')
-rw-r--r--audio/unix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/audio/unix.c b/audio/unix.c
index c77f29bc..94330856 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -304,6 +304,7 @@ static void a2dp_setup_complete(struct avdtp *session, struct a2dp_sep *sep,
struct ipc_codec_sbc *sbc = (void *) cfg->data;
struct a2dp_data *a2dp = &client->d.a2dp;
int fd;
+ uint16_t mtu;
GSList *caps;
client->req_id = 0;
@@ -319,11 +320,13 @@ static void a2dp_setup_complete(struct avdtp *session, struct a2dp_sep *sep,
a2dp->sep = sep;
a2dp->stream = stream;
- if (!avdtp_stream_get_transport(stream, &fd, &cfg->pkt_len, &caps)) {
+ if (!avdtp_stream_get_transport(stream, &fd, &mtu, &caps)) {
error("Unable to get stream transport");
goto failed;
}
+ cfg->pkt_len = mtu;
+
for (codec_cap = NULL; caps; caps = g_slist_next(caps)) {
cap = caps->data;
if (cap->category == AVDTP_MEDIA_CODEC) {