mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluez5-device: use correct RTP payload type
If one device tries to use PulseAudio to send audio over A2DP to another device with bluez-alsa, that doesn't work because PulseAudio uses an incorrect RTP payload type and bluez-alsa checks that the RTP payload type is correct. According to the A2DP spec, the payload type should be set to a number between 96 and 127. Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/591
This commit is contained in:
		
							parent
							
								
									9e0aa31f0a
								
							
						
					
					
						commit
						ff17374ffa
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -505,7 +505,12 @@ static int a2dp_process_render(struct userdata *u) {
 | 
			
		|||
    /* write it to the fifo */
 | 
			
		||||
    memset(sbc_info->buffer, 0, sizeof(*header) + sizeof(*payload));
 | 
			
		||||
    header->v = 2;
 | 
			
		||||
    header->pt = 1;
 | 
			
		||||
 | 
			
		||||
    /* A2DP spec: "A payload type in the RTP dynamic range shall be chosen".
 | 
			
		||||
     * RFC3551 defines the dynamic range to span from 96 to 127, and 96 appears
 | 
			
		||||
     * to be the most common choice in A2DP implementations. */
 | 
			
		||||
    header->pt = 96;
 | 
			
		||||
 | 
			
		||||
    header->sequence_number = htons(sbc_info->seq_num++);
 | 
			
		||||
    header->timestamp = htonl(u->write_index / pa_frame_size(&u->sample_spec));
 | 
			
		||||
    header->ssrc = htonl(1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue