You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avformat/yop: alloc codecpar extradata only once
Fixes memleak Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
		| @@ -72,12 +72,6 @@ static int yop_read_header(AVFormatContext *s) | ||||
|     if (ff_alloc_extradata(video_stream->codecpar, 8)) | ||||
|         return AVERROR(ENOMEM); | ||||
|  | ||||
|     video_stream->codecpar->extradata = av_mallocz(8 + AV_INPUT_BUFFER_PADDING_SIZE); | ||||
|  | ||||
|     if (!video_stream->codecpar->extradata) | ||||
|         return AVERROR(ENOMEM); | ||||
|     video_stream->codecpar->extradata_size = 8; | ||||
|  | ||||
|     // Audio | ||||
|     audio_par                 = audio_stream->codecpar; | ||||
|     audio_par->codec_type     = AVMEDIA_TYPE_AUDIO; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user