mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: stop before freeing things
Make sure all timers are stopped before we clear our state. See #2764
This commit is contained in:
		
							parent
							
								
									643d95f515
								
							
						
					
					
						commit
						c0fc29494f
					
				
					 4 changed files with 7 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -1645,8 +1645,7 @@ static int impl_clear(struct spa_handle *handle)
 | 
			
		|||
{
 | 
			
		||||
	struct impl *this = (struct impl *) handle;
 | 
			
		||||
 | 
			
		||||
	if (this->codec_data)
 | 
			
		||||
		this->codec->deinit(this->codec_data);
 | 
			
		||||
	do_stop(this);
 | 
			
		||||
	if (this->codec_props && this->codec->clear_props)
 | 
			
		||||
		this->codec->clear_props(this->codec_props);
 | 
			
		||||
	if (this->transport)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1452,8 +1452,8 @@ static int impl_clear(struct spa_handle *handle)
 | 
			
		|||
{
 | 
			
		||||
	struct impl *this = (struct impl *) handle;
 | 
			
		||||
	struct port *port = &this->port;
 | 
			
		||||
	if (this->codec_data)
 | 
			
		||||
		this->codec->deinit(this->codec_data);
 | 
			
		||||
 | 
			
		||||
	do_stop(this);
 | 
			
		||||
	if (this->codec_props && this->codec->clear_props)
 | 
			
		||||
		this->codec->clear_props(this->codec_props);
 | 
			
		||||
	if (this->transport)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1347,6 +1347,8 @@ static int impl_get_interface(struct spa_handle *handle, const char *type, void
 | 
			
		|||
static int impl_clear(struct spa_handle *handle)
 | 
			
		||||
{
 | 
			
		||||
	struct impl *this = (struct impl *) handle;
 | 
			
		||||
 | 
			
		||||
	do_stop(this);
 | 
			
		||||
	if (this->transport)
 | 
			
		||||
		spa_hook_remove(&this->transport_listener);
 | 
			
		||||
	spa_system_close(this->data_system, this->timerfd);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1391,6 +1391,8 @@ static int impl_get_interface(struct spa_handle *handle, const char *type, void
 | 
			
		|||
static int impl_clear(struct spa_handle *handle)
 | 
			
		||||
{
 | 
			
		||||
	struct impl *this = (struct impl *) handle;
 | 
			
		||||
 | 
			
		||||
	do_stop(this);
 | 
			
		||||
	if (this->transport)
 | 
			
		||||
		spa_hook_remove(&this->transport_listener);
 | 
			
		||||
	spa_system_close(this->data_system, this->timerfd);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue