diff options
author | Dale Curtis <dalecurtis@chromium.org> | 2017-11-28 13:44:49 -0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-11-29 04:47:28 +0100 |
commit | a3a0b5bd0aaae314619d5b41fb918aacd908a5ae (patch) | |
tree | 1e6f782ef1fd07a87151246f683ae5cc1ce30b38 /libavformat | |
parent | 86cead525633cd6114824b33a74d71be677f9546 (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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/oggparseopus.c | 1 |
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); |