mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Fix sending wrong codec capability length.
This commit is contained in:
		
							parent
							
								
									1a96c9b0a6
								
							
						
					
					
						commit
						e7e6f86bbe
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -458,9 +458,12 @@ static int bt_setconf(struct userdata *u) {
 | 
			
		|||
 | 
			
		||||
    strncpy(msg.setconf_req.device, u->addr, 18);
 | 
			
		||||
    msg.setconf_req.codec.transport = u->transport;
 | 
			
		||||
    if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP)
 | 
			
		||||
    if (u->transport == BT_CAPABILITIES_TRANSPORT_A2DP) {
 | 
			
		||||
        memcpy(&msg.setconf_req.codec, &u->a2dp.sbc_capabilities,
 | 
			
		||||
                sizeof(u->a2dp.sbc_capabilities));
 | 
			
		||||
        msg.setconf_req.h.length += msg.setconf_req.codec.length
 | 
			
		||||
                                    - sizeof(msg.setconf_req.codec);
 | 
			
		||||
    }
 | 
			
		||||
    msg.setconf_req.access_mode = BT_CAPABILITIES_ACCESS_MODE_WRITE;
 | 
			
		||||
 | 
			
		||||
    e = bt_audioservice_send(u->audioservice_fd, &msg.setconf_req.h);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue