Commit 872ebc6c authored by michael's avatar michael

segfault fix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4295 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1451dc50
...@@ -772,11 +772,13 @@ static int mov_read_stco(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) ...@@ -772,11 +772,13 @@ static int mov_read_stco(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
for(i=0; i<c->fc->nb_streams; i++){ for(i=0; i<c->fc->nb_streams; i++){
MOVStreamContext *sc2 = (MOVStreamContext *)c->fc->streams[i]->priv_data; MOVStreamContext *sc2 = (MOVStreamContext *)c->fc->streams[i]->priv_data;
if(sc2 && sc2->chunk_offsets){
int64_t first= sc2->chunk_offsets[0]; int64_t first= sc2->chunk_offsets[0];
int64_t last= sc2->chunk_offsets[sc2->chunk_count-1]; int64_t last= sc2->chunk_offsets[sc2->chunk_count-1];
if(first >= sc->chunk_offsets[entries-1] || last <= sc->chunk_offsets[0]) if(first >= sc->chunk_offsets[entries-1] || last <= sc->chunk_offsets[0])
c->ni=1; c->ni=1;
} }
}
#ifdef DEBUG #ifdef DEBUG
/* /*
for(i=0; i<entries; i++) { for(i=0; i<entries; i++) {
......
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