From a3a0b5bd0aaae314619d5b41fb918aacd908a5ae Mon Sep 17 00:00:00 2001 From: Dale Curtis Date: Tue, 28 Nov 2017 13:44:49 -0800 Subject: [PATCH] avformat/oggparseopus: Free opus extradata before reallocating. Otherwise ff_alloc_extradata() just leaks any existing allocated memory. Signed-off-by: Dale Curtis Signed-off-by: Michael Niedermayer --- 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);