stream-interaction: Fix crash when moving a ducked sink-input 96/211196/2 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.013918 accepted/tizen/5.5/unified/mobile/hotfix/20201027.072702 accepted/tizen/unified/20190808.113701 submit/tizen/20190807.082039 submit/tizen_5.5/20191031.000008 submit/tizen_5.5_mobile_hotfix/20201026.185108 tizen_5.5.m2_release
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 31 Jul 2019 02:48:32 +0000 (11:48 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 31 Jul 2019 05:26:14 +0000 (14:26 +0900)
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 <sc11.lee@samsung.com>
packaging/pulseaudio.spec
src/modules/stream-interaction.c

index 8686916..70e5a2d 100644 (file)
@@ -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
index da7a6eb..3d61462 100644 (file)
@@ -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);
 }