mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	port: handle NULL port info
This commit is contained in:
		
							parent
							
								
									a377bfa3f1
								
							
						
					
					
						commit
						8982e157c4
					
				
					 1 changed files with 7 additions and 5 deletions
				
			
		| 
						 | 
					@ -381,14 +381,16 @@ struct pw_port *pw_port_new(enum pw_direction direction,
 | 
				
			||||||
		goto error_no_mem;
 | 
							goto error_no_mem;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (info) {
 | 
				
			||||||
		if (SPA_FLAG_CHECK(info->flags, SPA_PORT_FLAG_PHYSICAL))
 | 
							if (SPA_FLAG_CHECK(info->flags, SPA_PORT_FLAG_PHYSICAL))
 | 
				
			||||||
			pw_properties_set(properties, PW_KEY_PORT_PHYSICAL, "1");
 | 
								pw_properties_set(properties, PW_KEY_PORT_PHYSICAL, "1");
 | 
				
			||||||
		if (SPA_FLAG_CHECK(info->flags, SPA_PORT_FLAG_TERMINAL))
 | 
							if (SPA_FLAG_CHECK(info->flags, SPA_PORT_FLAG_TERMINAL))
 | 
				
			||||||
			pw_properties_set(properties, PW_KEY_PORT_TERMINAL, "1");
 | 
								pw_properties_set(properties, PW_KEY_PORT_TERMINAL, "1");
 | 
				
			||||||
 | 
							this->spa_flags = info->flags;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	this->direction = direction;
 | 
						this->direction = direction;
 | 
				
			||||||
	this->port_id = port_id;
 | 
						this->port_id = port_id;
 | 
				
			||||||
	this->spa_flags = info->flags;
 | 
					 | 
				
			||||||
	this->properties = properties;
 | 
						this->properties = properties;
 | 
				
			||||||
	this->state = PW_PORT_STATE_INIT;
 | 
						this->state = PW_PORT_STATE_INIT;
 | 
				
			||||||
	this->rt.io = SPA_IO_BUFFERS_INIT;
 | 
						this->rt.io = SPA_IO_BUFFERS_INIT;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue