[FFmpeg-cvslog] avformat/oggparseopus: Free opus extradata before reallocating.
Dale Curtis
git at videolan.org
Wed Nov 29 05:47:47 EET 2017
ffmpeg | branch: master | Dale Curtis <dalecurtis at chromium.org> | Tue Nov 28 13:44:49 2017 -0800| [a3a0b5bd0aaae314619d5b41fb918aacd908a5ae] | committer: Michael Niedermayer
avformat/oggparseopus: Free opus extradata before reallocating.
Otherwise ff_alloc_extradata() just leaks any existing allocated
memory.
Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a3a0b5bd0aaae314619d5b41fb918aacd908a5ae
---
libavformat/oggparseopus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/oggparseopus.c b/libavformat/oggparseopus.c
index f45ad84874..cd34cf23ba 100644
--- a/libavformat/oggparseopus.c
+++ b/libavformat/oggparseopus.c
@@ -62,6 +62,7 @@ static int opus_header(AVFormatContext *avf, int idx)
/*gain = AV_RL16(packet + 16);*/
/*channel_map = AV_RL8 (packet + 18);*/
+ av_freep(&st->codecpar->extradata);
if (ff_alloc_extradata(st->codecpar, os->psize))
return AVERROR(ENOMEM);
More information about the ffmpeg-cvslog
mailing list