mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	loopback: Use the real sample spec once it's known.
When module-loopback is loaded without arguments, the ss and map variables are initialized with dummy values. This caused a problem, because also pa_memblockq_new() was called with the dummy values, making it work incorrectly. The base was set to 1 instead of the real frame size, which in turn caused alignment related crashes.
This commit is contained in:
		
							parent
							
								
									e4adf9c4d8
								
							
						
					
					
						commit
						a68652a42c
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -845,6 +845,11 @@ int pa__init(pa_module *m) {
 | 
			
		|||
    if (!u->sink_input)
 | 
			
		||||
        goto fail;
 | 
			
		||||
 | 
			
		||||
    /* If format, rate or channels were originally unset, they are set now
 | 
			
		||||
     * after the pa_sink_input_new() call. */
 | 
			
		||||
    ss = u->sink_input->sample_spec;
 | 
			
		||||
    map = u->sink_input->channel_map;
 | 
			
		||||
 | 
			
		||||
    u->sink_input->parent.process_msg = sink_input_process_msg_cb;
 | 
			
		||||
    u->sink_input->pop = sink_input_pop_cb;
 | 
			
		||||
    u->sink_input->process_rewind = sink_input_process_rewind_cb;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue