[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] virtual sources: Propagate asyncmsgq change after source-output move
Tanu Kaskinen
gitlab at gitlab.freedesktop.org
Thu Jan 16 11:05:34 UTC 2020
Tanu Kaskinen pushed to branch master at PulseAudio / pulseaudio
Commits:
051f7508 by Georg Chini at 2020-01-13T20:40:04+01:00
virtual sources: Propagate asyncmsgq change after source-output move
Currently, when the master of a virtual source is moved, the change of the
asyncmsgq is not propagated to other attached virtual sources. This leads
to a crash when the original master source is no longer available.
This patch fixes the issue by modifying the moving callback to propagate the
change to attached virtual sources.
Virtual sinks show a similar bug but that will be fixed in a different patch
series.
- - - - -
3 changed files:
- src/modules/echo-cancel/module-echo-cancel.c
- src/modules/module-remap-source.c
- src/modules/module-virtual-source.c
Changes:
=====================================
src/modules/echo-cancel/module-echo-cancel.c
=====================================
@@ -1466,6 +1466,8 @@ static bool sink_input_may_move_to_cb(pa_sink_input *i, pa_sink *dest) {
/* Called from main context. */
static void source_output_moving_cb(pa_source_output *o, pa_source *dest) {
struct userdata *u;
+ uint32_t idx;
+ pa_source_output *output;
pa_source_output_assert_ref(o);
pa_assert_ctl_context();
@@ -1477,6 +1479,12 @@ static void source_output_moving_cb(pa_source_output *o, pa_source *dest) {
} else
pa_source_set_asyncmsgq(u->source, NULL);
+ /* Propagate asyncmsq change to attached virtual sources */
+ PA_IDXSET_FOREACH(output, u->source->outputs, idx) {
+ if (output->destination_source && output->moving)
+ output->moving(output, u->source);
+ }
+
if (u->source_auto_desc && dest) {
const char *y, *z;
pa_proplist *pl;
=====================================
src/modules/module-remap-source.c
=====================================
@@ -252,6 +252,8 @@ static void source_output_state_change_cb(pa_source_output *o, pa_source_output_
/* Called from main thread */
static void source_output_moving_cb(pa_source_output *o, pa_source *dest) {
struct userdata *u;
+ uint32_t idx;
+ pa_source_output *output;
pa_source_output_assert_ref(o);
pa_assert_ctl_context();
@@ -263,6 +265,12 @@ static void source_output_moving_cb(pa_source_output *o, pa_source *dest) {
} else
pa_source_set_asyncmsgq(u->source, NULL);
+ /* Propagate asyncmsq change to attached virtual sources */
+ PA_IDXSET_FOREACH(output, u->source->outputs, idx) {
+ if (output->destination_source && output->moving)
+ output->moving(output, u->source);
+ }
+
if (u->auto_desc && dest) {
const char *k;
pa_proplist *pl;
=====================================
src/modules/module-virtual-source.c
=====================================
@@ -446,6 +446,8 @@ static void source_output_kill_cb(pa_source_output *o) {
/* Called from main thread */
static void source_output_moving_cb(pa_source_output *o, pa_source *dest) {
struct userdata *u;
+ uint32_t idx;
+ pa_source_output *output;
pa_source_output_assert_ref(o);
pa_assert_ctl_context();
@@ -457,6 +459,12 @@ static void source_output_moving_cb(pa_source_output *o, pa_source *dest) {
} else
pa_source_set_asyncmsgq(u->source, NULL);
+ /* Propagate asyncmsq change to attached virtual sources */
+ PA_IDXSET_FOREACH(output, u->source->outputs, idx) {
+ if (output->destination_source && output->moving)
+ output->moving(output, u->source);
+ }
+
if (u->auto_desc && dest) {
const char *z;
pa_proplist *pl;
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/051f7508b4a99f4908d04364c39faf010ca00908
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/051f7508b4a99f4908d04364c39faf010ca00908
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20200116/4d9e0ef9/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list