summaryrefslogtreecommitdiff
path: root/libavformat/oggdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/oggdec.c')
-rw-r--r--libavformat/oggdec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 38f60653f9..27d16a3e4e 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -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);
}