diff options
-rw-r--r-- | audio/a2dp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/audio/a2dp.c b/audio/a2dp.c index de15a42a..df3c780b 100644 --- a/audio/a2dp.c +++ b/audio/a2dp.c @@ -604,12 +604,21 @@ static gboolean start_ind(struct avdtp *session, struct avdtp_local_sep *sep, void *user_data) { struct a2dp_sep *a2dp_sep = user_data; + struct a2dp_setup *setup; if (a2dp_sep->type == AVDTP_SEP_TYPE_SINK) debug("Sink %p: Start_Ind", sep); else debug("Source %p: Start_Ind", sep); + setup = find_setup_by_session(session); + if (setup) { + if (setup->canceled) + setup_unref(setup); + else + finalize_resume(setup); + } + if (!a2dp_sep->locked) { a2dp_sep->session = avdtp_ref(session); a2dp_sep->suspend_timer = g_timeout_add(SUSPEND_TIMEOUT, |