Commit b73220b7 authored by bcoudurier's avatar bcoudurier

add sanity checks

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7679 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1cb4bf6c
......@@ -1619,7 +1619,12 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
for(i=0; i<mov->total_streams; i++) {
MOVStreamContext *sc = mov->streams[i];
/* sanity checks */
if(!sc->stts_count || !sc->chunk_count || !sc->sample_to_chunk_sz ||
(!sc->sample_size && !sc->sample_count)){
av_log(s, AV_LOG_ERROR, "missing mandatory atoms, broken header\n");
return -1;
}
if(!sc->time_rate)
sc->time_rate=1;
if(!sc->time_scale)
......
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