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:
parent
86cead5256
commit
a3a0b5bd0a
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user