mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	jack: destroy link proxy
Destroy the link proxy immediately so that we don't leak it. The link is marked as 'linger' and will thus keep on living even when our proxy is gone.
This commit is contained in:
		
							parent
							
								
									38cfa2d71d
								
							
						
					
					
						commit
						253e304124
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -3667,6 +3667,7 @@ int jack_connect (jack_client_t *client,
 | 
				
			||||||
	struct object *src, *dst;
 | 
						struct object *src, *dst;
 | 
				
			||||||
	struct spa_dict props;
 | 
						struct spa_dict props;
 | 
				
			||||||
	struct spa_dict_item items[5];
 | 
						struct spa_dict_item items[5];
 | 
				
			||||||
 | 
						struct pw_proxy *proxy;
 | 
				
			||||||
	char val[4][16];
 | 
						char val[4][16];
 | 
				
			||||||
	int res;
 | 
						int res;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3701,7 +3702,7 @@ int jack_connect (jack_client_t *client,
 | 
				
			||||||
	items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_LINK_INPUT_PORT, val[3]);
 | 
						items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_LINK_INPUT_PORT, val[3]);
 | 
				
			||||||
	items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_OBJECT_LINGER, "true");
 | 
						items[props.n_items++] = SPA_DICT_ITEM_INIT(PW_KEY_OBJECT_LINGER, "true");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_core_create_object(c->core,
 | 
						proxy = pw_core_create_object(c->core,
 | 
				
			||||||
				    "link-factory",
 | 
									    "link-factory",
 | 
				
			||||||
				    PW_TYPE_INTERFACE_Link,
 | 
									    PW_TYPE_INTERFACE_Link,
 | 
				
			||||||
				    PW_VERSION_LINK,
 | 
									    PW_VERSION_LINK,
 | 
				
			||||||
| 
						 | 
					@ -3709,6 +3710,8 @@ int jack_connect (jack_client_t *client,
 | 
				
			||||||
				    0);
 | 
									    0);
 | 
				
			||||||
	res = do_sync(c);
 | 
						res = do_sync(c);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						pw_proxy_destroy(proxy);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      exit:
 | 
					      exit:
 | 
				
			||||||
	pw_thread_loop_unlock(c->context.loop);
 | 
						pw_thread_loop_unlock(c->context.loop);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue