Skip to content

Commit

Permalink
stream-interaction: Use PA_IDXSET_FOREACH macro to iterate idxset
Browse files Browse the repository at this point in the history
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
  • Loading branch information
sangchul1011 authored and georgchini committed Mar 26, 2019
1 parent 0f4f109 commit 5540f72
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/modules/stream-interaction.c
Expand Up @@ -187,7 +187,7 @@ static inline void apply_interaction_to_sink(struct userdata *u, pa_sink *s, con
pa_assert(u);
pa_sink_assert_ref(s);

for (j = PA_SINK_INPUT(pa_idxset_first(s->inputs, &idx)); j; j = PA_SINK_INPUT(pa_idxset_next(s->inputs, &idx))) {
PA_IDXSET_FOREACH(j, s->inputs, idx) {
bool corked, interaction_applied;
const char *role;

Expand Down Expand Up @@ -247,9 +247,7 @@ static void remove_interactions(struct userdata *u, struct group *g) {
const char *role;

PA_IDXSET_FOREACH(s, u->core->sinks, idx) {

for (j = PA_SINK_INPUT(pa_idxset_first(s->inputs, &idx_input)); j; j = PA_SINK_INPUT(pa_idxset_next(s->inputs, &idx_input))) {

PA_IDXSET_FOREACH(j, s->inputs, idx_input) {
if(!!pa_hashmap_get(g->interaction_state, j)) {
corked = (j->state == PA_SINK_INPUT_CORKED);
if (!(role = pa_proplist_gets(j->proplist, PA_PROP_MEDIA_ROLE)))
Expand Down

0 comments on commit 5540f72

Please sign in to comment.