summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-09-28 00:33:21 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-09-28 00:33:21 +0000
commit6d19fd5c26cc2971a9925376f52e57c286d2326b (patch)
treeafe53688083a1624e2d43b43b22104594c5bfc56 /libavformat/mov.c
parentbd8154d0b337e7a9f4dd1a728f4409fbe37c8fea (diff)
In mov demuxer, check that nb_streams is valid before using it in read_dac3
Originally committed as revision 25240 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index fdf297096e..89fad78de3 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -567,6 +567,8 @@ static int mov_read_dac3(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
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);