diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 2a2be2a509..fe19988c07 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -647,6 +647,9 @@ static int ogg_read_close(AVFormatContext *s) av_freep(&ogg->streams[i].private); av_freep(&ogg->streams[i].new_metadata); } + + ogg->nstreams = 0; + av_freep(&ogg->streams); return 0; }