mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	implement recording in native API
fix a memory leak in memblock.c git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@55 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									cffc7768bd
								
							
						
					
					
						commit
						70bb8165ec
					
				
					 11 changed files with 349 additions and 107 deletions
				
			
		| 
						 | 
				
			
			@ -69,12 +69,13 @@ void pa_memblock_unref_fixed(struct pa_memblock *b) {
 | 
			
		|||
    if (b->ref == 1) {
 | 
			
		||||
        pa_memblock_unref(b);
 | 
			
		||||
        return;
 | 
			
		||||
    } else {
 | 
			
		||||
        d = malloc(b->length);
 | 
			
		||||
        assert(d);
 | 
			
		||||
        memcpy(d, b->data, b->length);
 | 
			
		||||
        b->data = d;
 | 
			
		||||
        b->type = PA_MEMBLOCK_DYNAMIC;
 | 
			
		||||
        b->ref--;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    d = malloc(b->length);
 | 
			
		||||
    assert(d);
 | 
			
		||||
    memcpy(d, b->data, b->length);
 | 
			
		||||
    b->data = d;
 | 
			
		||||
    b->type = PA_MEMBLOCK_DYNAMIC;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue