mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module-rtp: resync after paused state
After the paused state, resync to the new clock time.
This commit is contained in:
		
							parent
							
								
									dd0d3ac264
								
							
						
					
					
						commit
						aa3b776f6f
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -382,6 +382,7 @@ static void stream_process(void *data)
 | 
			
		|||
	if (!impl->sync) {
 | 
			
		||||
		pw_log_info("sync to timestamp %u", timestamp);
 | 
			
		||||
		impl->ring.readindex = impl->ring.writeindex = timestamp;
 | 
			
		||||
		memset(impl->buffer, 0, BUFFER_SIZE);
 | 
			
		||||
		impl->sync = true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -421,6 +422,9 @@ static void on_stream_state_changed(void *d, enum pw_stream_state old,
 | 
			
		|||
	case PW_STREAM_STATE_ERROR:
 | 
			
		||||
		pw_log_error("stream error: %s", error);
 | 
			
		||||
		break;
 | 
			
		||||
	case PW_STREAM_STATE_PAUSED:
 | 
			
		||||
		impl->sync = false;
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		break;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -502,6 +506,7 @@ static int make_socket(struct sockaddr_storage *src, socklen_t src_len,
 | 
			
		|||
	if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &val, sizeof(val)) < 0)
 | 
			
		||||
		pw_log_warn("setsockopt(SO_PRIORITY) failed: %m");
 | 
			
		||||
#endif
 | 
			
		||||
	/* FIXME AES67 wants IPTOS_DSCP_AF41 */
 | 
			
		||||
	val = IPTOS_LOWDELAY;
 | 
			
		||||
	if (setsockopt(fd, IPPROTO_IP, IP_TOS, &val, sizeof(val)) < 0)
 | 
			
		||||
		pw_log_warn("setsockopt(IP_TOS) failed: %m");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue