Commit b6017446 authored by bcoudurier's avatar bcoudurier

add one missing check for stream existence in read_elst, fix #1364

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19792 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ff455a81
...@@ -1905,9 +1905,13 @@ free_and_return: ...@@ -1905,9 +1905,13 @@ free_and_return:
/* edit list atom */ /* edit list atom */
static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOVAtom 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; 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_byte(pb); /* version */
get_be24(pb); /* flags */ get_be24(pb); /* flags */
edit_count = get_be32(pb); /* entries */ edit_count = get_be32(pb); /* entries */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment