Commit 44e43aab authored by Baptiste Coudurier's avatar Baptiste Coudurier

check frag track id before setting st

Originally committed as revision 12634 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 3a027f5e
......@@ -1442,14 +1442,18 @@ static int mov_read_trex(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
{
MOVFragment *frag = &c->fragment;
AVStream *st = c->fc->streams[frag->track_id-1];
MOVStreamContext *sc = st->priv_data;
AVStream *st;
MOVStreamContext *sc;
uint64_t offset;
int64_t dts;
int data_offset = 0;
unsigned entries, first_sample_flags = frag->flags;
int flags, distance, i;
if (!frag->track_id || frag->track_id > c->fc->nb_streams)
return -1;
st = c->fc->streams[frag->track_id-1];
sc = st->priv_data;
if (sc->pseudo_stream_id+1 != frag->stsd_id)
return 0;
if (!st->nb_index_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