1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Dale Curtis 2017-11-28 13:44:49 -08:00 committed by Michael Niedermayer
parent 86cead5256
commit a3a0b5bd0a

View File

@ -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);