Commit a3a0b5bd authored by Dale Curtis's avatar Dale Curtis Committed by Michael Niedermayer

avformat/oggparseopus: Free opus extradata before reallocating.

Otherwise ff_alloc_extradata() just leaks any existing allocated
memory.
Signed-off-by: 's avatarDale Curtis <dalecurtis@chromium.org>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 86cead52
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment