[FFmpeg-cvslog] avformat/yop: alloc codecpar extradata only once
James Almer
git at videolan.org
Thu Apr 14 23:58:06 CEST 2016
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Apr 14 15:55:10 2016 -0300| [c8ed93efcf4d52babb7dd1d2dec6c564bbda6da5] | committer: James Almer
avformat/yop: alloc codecpar extradata only once
Fixes memleak
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c8ed93efcf4d52babb7dd1d2dec6c564bbda6da5
---
libavformat/yop.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/libavformat/yop.c b/libavformat/yop.c
index 997ca4b..e6fd896 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list