mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	time-smoother-2: Fix integer type problem
The byte_count argument of pa_smoother_2_get_delay() was defined as size_t which lead to overflow problems on 32-bit architectures. Changed type to uint_64. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/700>
This commit is contained in:
		
							parent
							
								
									9811c84a54
								
							
						
					
					
						commit
						325108e532
					
				
					 3 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -1816,8 +1816,8 @@ static pa_usec_t calc_time(const pa_stream *s, bool ignore_transport) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
#ifdef USE_SMOOTHER_2
 | 
			
		||||
static inline size_t calc_bytes(pa_stream *s, bool ignore_transport) {
 | 
			
		||||
    return pa_usec_to_bytes(calc_time(s, ignore_transport), &s->sample_spec);
 | 
			
		||||
static inline uint64_t calc_bytes(pa_stream *s, bool ignore_transport) {
 | 
			
		||||
    return (uint64_t)(calc_time(s, ignore_transport) * s->sample_spec.rate / PA_USEC_PER_SEC * pa_frame_size(&s->sample_spec));
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue