summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Curtis <dalecurtis@chromium.org>2017-11-28 13:44:49 -0800
committerMichael Niedermayer <michael@niedermayer.cc>2017-11-29 04:47:28 +0100
commita3a0b5bd0aaae314619d5b41fb918aacd908a5ae (patch)
tree1e6f782ef1fd07a87151246f683ae5cc1ce30b38
parent86cead525633cd6114824b33a74d71be677f9546 (diff)
avformat/oggparseopus: Free opus extradata before reallocating.
Otherwise ff_alloc_extradata() just leaks any existing allocated memory. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/oggparseopus.c1
1 files changed, 1 insertions, 0 deletions
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);