mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	echo-cancel: Don't crash if adjust_time = 0
This commit is contained in:
		
							parent
							
								
									f9b59e457c
								
							
						
					
					
						commit
						0429fe6153
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -404,7 +404,7 @@ static int source_set_state_cb(pa_source *s, pa_source_state_t state) {
 | 
				
			||||||
    if (state == PA_SOURCE_RUNNING) {
 | 
					    if (state == PA_SOURCE_RUNNING) {
 | 
				
			||||||
        /* restart timer when both sink and source are active */
 | 
					        /* restart timer when both sink and source are active */
 | 
				
			||||||
        u->active_mask |= 1;
 | 
					        u->active_mask |= 1;
 | 
				
			||||||
        if (u->active_mask == 3)
 | 
					        if (u->active_mask == 3 && u->adjust_time)
 | 
				
			||||||
            pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
 | 
					            pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        pa_atomic_store(&u->request_resync, 1);
 | 
					        pa_atomic_store(&u->request_resync, 1);
 | 
				
			||||||
| 
						 | 
					@ -432,7 +432,7 @@ static int sink_set_state_cb(pa_sink *s, pa_sink_state_t state) {
 | 
				
			||||||
    if (state == PA_SINK_RUNNING) {
 | 
					    if (state == PA_SINK_RUNNING) {
 | 
				
			||||||
        /* restart timer when both sink and source are active */
 | 
					        /* restart timer when both sink and source are active */
 | 
				
			||||||
        u->active_mask |= 2;
 | 
					        u->active_mask |= 2;
 | 
				
			||||||
        if (u->active_mask == 3)
 | 
					        if (u->active_mask == 3 && u->adjust_time)
 | 
				
			||||||
            pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
 | 
					            pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        pa_atomic_store(&u->request_resync, 1);
 | 
					        pa_atomic_store(&u->request_resync, 1);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue