[FFmpeg-cvslog] oggdec: Recreate streams only in the 1 stream case.
Michael Niedermayer
git at videolan.org
Tue Apr 17 14:27:51 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr 17 14:03:26 2012 +0200| [9bb3b7d028395a8fe70148dec89430e8aae7a7e2] | committer: Michael Niedermayer
oggdec: Recreate streams only in the 1 stream case.
Other cases are not supported and lead to inconsistencies which
can lead to out of array writes.
Reported-by: Dale Curtis <dalecurtis at chromium.org>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9bb3b7d028395a8fe70148dec89430e8aae7a7e2
---
libavformat/oggdec.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index bdd2c5b..ab52379 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -247,6 +247,9 @@ static int ogg_read_page(AVFormatContext *s, int *str)
if (ogg->headers) {
int n;
+ if (ogg->nstreams != 1)
+ return idx;
+
for (n = 0; n < ogg->nstreams; n++) {
av_freep(&ogg->streams[n].buf);
if (!ogg->state || ogg->state->streams[n].private != ogg->streams[n].private)
More information about the ffmpeg-cvslog
mailing list