You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avformat/gif: abort early if nothing was written yet
Fixes crash when writting trailer without any previous packets.
This commit is contained in:
		| @@ -174,6 +174,9 @@ static int gif_write_trailer(AVFormatContext *s) | ||||
|     GIFContext *gif = s->priv_data; | ||||
|     AVIOContext *pb = s->pb; | ||||
|  | ||||
|     if (!gif->prev_pkt) | ||||
|         return AVERROR(EINVAL); | ||||
|  | ||||
|     gif_write_packet(s, NULL); | ||||
|  | ||||
|     if (!gif->have_end) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user