changeset 6491:b7f807b4cd88 libavformat tip

In mov demuxer, check that nb_streams is valid before using it in read_dac3
author bcoudurier
date Tue, 28 Sep 2010 00:33:21 +0000
parents e1716e7b179f
children
files mov.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Mon Sep 27 22:17:58 2010 +0000
+++ b/mov.c	Tue Sep 28 00:33:21 2010 +0000
@@ -567,6 +567,8 @@
     AVStream *st;
     int ac3info, acmod, lfeon;
 
+    if (c->fc->nb_streams < 1)
+        return 0;
     st = c->fc->streams[c->fc->nb_streams-1];
 
     ac3info = get_be24(pb);