The number of streams in the Ogg context is well set to 0 but not in the a/v format context, so the number of stream is incremented in av_new_stream and leads to a leak (and maybe worst). The attached patch fix this.
-- Clément B.
From ec643696bd0bae8221eb5483cecebacc19e8db57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <ubi...@gmail.com> Date: Thu, 28 Apr 2011 13:08:37 +0200 Subject: [PATCH] oggdec: fix number of stream being incremented at format context level --- libavformat/oggdec.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 8d96320..9acdecc 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -250,6 +250,7 @@ ogg_read_page (AVFormatContext * s, int *str) } ogg->curidx = -1; ogg->nstreams = 0; + s->nb_streams = 0; } idx = ogg_new_stream (s, serial); if (idx < 0) -- 1.7.4.4
pgpvMMQXd4d7t.pgp
Description: PGP signature
_______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel