ffmpeg: fix segfault with random output
Found-by: <durandal_1707> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		
							parent
							
								
									6354a6ce52
								
							
						
					
					
						commit
						49ec4c7e49
					
				
							
								
								
									
										2
									
								
								ffmpeg.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								ffmpeg.c
									
									
									
									
									
								
							| @ -452,7 +452,7 @@ static void exit_program(void) | |||||||
|     /* close files */ |     /* close files */ | ||||||
|     for (i = 0; i < nb_output_files; i++) { |     for (i = 0; i < nb_output_files; i++) { | ||||||
|         AVFormatContext *s = output_files[i]->ctx; |         AVFormatContext *s = output_files[i]->ctx; | ||||||
|         if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb) |         if (s && !(s->oformat->flags & AVFMT_NOFILE) && s->pb) | ||||||
|             avio_close(s->pb); |             avio_close(s->pb); | ||||||
|         avformat_free_context(s); |         avformat_free_context(s); | ||||||
|         av_dict_free(&output_files[i]->opts); |         av_dict_free(&output_files[i]->opts); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user