Commit 8fd120cb authored by Wim Taymans's avatar Wim Taymans
Browse files

media-session: recheck route status when != available

Save the new state so we can detect changes
Check for available != yes to also recheck when the state becomes
unknown.
parent f43bcca3
Pipeline #263694 passed with stages
in 2 minutes and 7 seconds
...@@ -598,7 +598,7 @@ static int handle_route(struct device *dev, struct route *r) ...@@ -598,7 +598,7 @@ static int handle_route(struct device *dev, struct route *r)
i->restore = false; i->restore = false;
restore = true; restore = true;
} else { } else {
if (r->available == SPA_PARAM_AVAILABILITY_no && i->available != r->available) { if (r->available != SPA_PARAM_AVAILABILITY_yes && i->available != r->available) {
/* an existing port has changed to unavailable */ /* an existing port has changed to unavailable */
pw_log_info("device %d: route '%s' not available", dev->id, r->name); pw_log_info("device %d: route '%s' not available", dev->id, r->name);
...@@ -615,6 +615,7 @@ static int handle_route(struct device *dev, struct route *r) ...@@ -615,6 +615,7 @@ static int handle_route(struct device *dev, struct route *r)
restore = true; restore = true;
} }
} }
i->available = r->available;
} }
i->generation = dev->generation; i->generation = dev->generation;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment