From 44b7bcd6c1acdc421d83e37efddf0b372cbc8c75 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 21 Apr 2011 10:33:31 +0300 Subject: [PATCH] Use flushable packets for A2DP media data --- audio/avdtp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/audio/avdtp.c b/audio/avdtp.c index 24372a50e..c2aeeec77 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -878,6 +878,7 @@ static void handle_transport_connect(struct avdtp *session, GIOChannel *io, struct avdtp_stream *stream = session->pending_open; struct avdtp_local_sep *sep = stream->lsep; int sk, buf_size, min_buf_size; + GError *err = NULL; session->pending_open = NULL; @@ -906,6 +907,15 @@ static void handle_transport_connect(struct avdtp *session, GIOChannel *io, if (sep->info.type != AVDTP_SEP_TYPE_SOURCE) goto proceed; + bt_io_set(stream->io, BT_IO_L2CAP, &err, + BT_IO_OPT_FLUSHABLE, TRUE, + BT_IO_OPT_INVALID); + if (err != NULL) { + error("Enabling flushable packets failed: %s", err->message); + g_error_free(err); + } else + DBG("Flushable packets enabled"); + sk = g_io_channel_unix_get_fd(stream->io); buf_size = get_send_buffer_size(sk); if (buf_size < 0) -- 2.47.3