avformat/movenc: Don't forget to free fragment buffers
The buffers used when fragmented output is enabled have up until now not been freed in the deinit function; they leak e.g. if one errors out of mov_write_trailer() before one reaches the point where they are normally written out and freed. This can e.g. happen if allocating new vos_data fails at the beginning of mov_write_trailer(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit e3b5316bede3cf735f66a0a1b83ca833693ffce7)
This commit is contained in:
		
							parent
							
								
									3fc8dc3589
								
							
						
					
					
						commit
						bcf3ac039b
					
				@ -6181,9 +6181,11 @@ static void mov_free(AVFormatContext *s)
 | 
				
			|||||||
            av_freep(&mov->tracks[i].vos_data);
 | 
					            av_freep(&mov->tracks[i].vos_data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ff_mov_cenc_free(&mov->tracks[i].cenc);
 | 
					        ff_mov_cenc_free(&mov->tracks[i].cenc);
 | 
				
			||||||
 | 
					        ffio_free_dyn_buf(&mov->tracks[i].mdat_buf);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    av_freep(&mov->tracks);
 | 
					    av_freep(&mov->tracks);
 | 
				
			||||||
 | 
					    ffio_free_dyn_buf(&mov->mdat_buf);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static uint32_t rgb_to_yuv(uint32_t rgb)
 | 
					static uint32_t rgb_to_yuv(uint32_t rgb)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user