aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-09-07 22:36:33 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-09-07 22:36:33 +0000
commit1c4bf2ec37b296474e9cac8298722609633e5848 (patch)
tree695d4fb22d39a84a6dc98b3439ae1680b3f6b772 /libavformat/mov.c
parent7d73d1c3363eed43dc8d0158c928d3edccd2d542 (diff)
downloadffmpeg-1c4bf2ec37b296474e9cac8298722609633e5848.tar.gz
add one missing check for stream existence in read_elst, fix #1364
Originally committed as revision 19792 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 74698e0547..5f11ebe711 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1905,9 +1905,13 @@ free_and_return:
/* 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 */