From f7d05b2fee499f2fb48fd3510bcce1d08d6392e3 Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Wed, 31 Jul 2019 11:48:32 +0900 Subject: [PATCH] stream-interaction: Fix crash when moving a ducked sink-input The operation of a ducked stream in sink_input_move_start_cb() should differ from sink_input_unlink_cb(). [Version] 11.1-79 [Issue Type] Bug fix Change-Id: I698f3ca232b7151aaae021572a559d54bc3209bf Signed-off-by: Sangchul Lee --- packaging/pulseaudio.spec | 2 +- src/modules/stream-interaction.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packaging/pulseaudio.spec b/packaging/pulseaudio.spec index 8686916..70e5a2d 100644 --- a/packaging/pulseaudio.spec +++ b/packaging/pulseaudio.spec @@ -3,7 +3,7 @@ Name: pulseaudio Summary: Improved Linux sound server Version: 11.1 -Release: 78 +Release: 79 Group: Multimedia/Audio License: LGPL-2.1 URL: http://pulseaudio.org diff --git a/src/modules/stream-interaction.c b/src/modules/stream-interaction.c index da7a6eb..3d61462 100644 --- a/src/modules/stream-interaction.c +++ b/src/modules/stream-interaction.c @@ -438,8 +438,6 @@ static pa_hook_result_t process(struct userdata *u, pa_object *stream, bool crea #ifdef __TIZEN__ if (!create) { for (j = 0; j < u->n_groups; j++) { - if (pa_sink_input_isinstance(stream)) - pa_idxset_remove_by_data(u->groups[j]->interacted_inputs, stream, NULL); if (u->duck) pa_idxset_remove_by_data(u->groups[j]->triggered_streams, stream, NULL); } @@ -492,8 +490,16 @@ static pa_hook_result_t sink_input_put_cb(pa_core *core, pa_sink_input *i, struc } static pa_hook_result_t sink_input_unlink_cb(pa_core *core, pa_sink_input *i, struct userdata *u) { +#ifdef __TIZEN__ + int j; + pa_core_assert_ref(core); +#endif pa_sink_input_assert_ref(i); +#ifdef __TIZEN__ + for (j = 0; j < u->n_groups; j++) + pa_idxset_remove_by_data(u->groups[j]->interacted_inputs, (void*)i, NULL); +#endif return process(u, PA_OBJECT(i), false, false); } -- 2.7.4