mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									f43bcca35e
								
							
						
					
					
						commit
						8fd120cb23
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -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)
 | 
				
			||||||
				restore = true;
 | 
									restore = true;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							i->available = r->available;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	i->generation = dev->generation;
 | 
						i->generation = dev->generation;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue