mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	core: adjust volume only when there is actually a memory block
Fixes an assert that is hit in somne niche cases: https://bugzilla.redhat.com/show_bug.cgi?id=533482
This commit is contained in:
		
							parent
							
								
									f3866f2635
								
							
						
					
					
						commit
						d9b5bbca01
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		| 
						 | 
					@ -717,14 +717,15 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink frames */, p
 | 
				
			||||||
                pa_memchunk rchunk;
 | 
					                pa_memchunk rchunk;
 | 
				
			||||||
                pa_resampler_run(i->thread_info.resampler, &wchunk, &rchunk);
 | 
					                pa_resampler_run(i->thread_info.resampler, &wchunk, &rchunk);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*                 pa_log_debug("pushing %lu", (unsigned long) rchunk.length); */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (rchunk.memblock) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if (nvfs) {
 | 
					                    if (nvfs) {
 | 
				
			||||||
                        pa_memchunk_make_writable(&rchunk, 0);
 | 
					                        pa_memchunk_make_writable(&rchunk, 0);
 | 
				
			||||||
                        pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &i->volume_factor_sink);
 | 
					                        pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &i->volume_factor_sink);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*                 pa_log_debug("pushing %lu", (unsigned long) rchunk.length); */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                if (rchunk.memblock) {
 | 
					 | 
				
			||||||
                    pa_memblockq_push_align(i->thread_info.render_memblockq, &rchunk);
 | 
					                    pa_memblockq_push_align(i->thread_info.render_memblockq, &rchunk);
 | 
				
			||||||
                    pa_memblock_unref(rchunk.memblock);
 | 
					                    pa_memblock_unref(rchunk.memblock);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue