Commit da069e9c authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/oggdec: Fix metadata memleak on multiple headers

Fixes: Chromium bug 800123
Reported-by: 's avatarMatt Wolenetz <wolenetz@google.com>
Reviewed-by: 's avatarMatt Wolenetz <wolenetz@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 3934aa49
......@@ -128,7 +128,10 @@ static int ogg_restore(AVFormatContext *s)
ogg->state = ost->next;
for (i = 0; i < ogg->nstreams; i++) {
av_freep(&ogg->streams[i].buf);
struct ogg_stream *stream = &ogg->streams[i];
av_freep(&stream->buf);
av_freep(&stream->new_metadata);
if (i >= ost->nstreams || !ost->streams[i].private) {
free_stream(s, i);
}
......
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