Mercurial > libavformat.hg
changeset 5164:99c46fe0b8a0 libavformat
add one missing check for stream existence in read_elst, fix #1364
author | bcoudurier |
---|---|
date | Mon, 07 Sep 2009 22:36:33 +0000 |
parents | 01514407ab35 |
children | 3d4203b9c2d7 |
files | mov.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Mon Sep 07 10:49:51 2009 +0000 +++ b/mov.c Mon Sep 07 22:36:33 2009 +0000 @@ -1905,9 +1905,13 @@ /* edit list atom */ static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOVAtom atom) { - MOVStreamContext *sc = c->fc->streams[c->fc->nb_streams-1]->priv_data; + MOVStreamContext *sc; int i, edit_count; + if (c->fc->nb_streams < 1) + return 0; + sc = c->fc->streams[c->fc->nb_streams-1]->priv_data; + get_byte(pb); /* version */ get_be24(pb); /* flags */ edit_count = get_be32(pb); /* entries */