Commit 0963a167 authored by bcoudurier's avatar bcoudurier

support mp4 fragmented files without any samples in the moov atom

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12635 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1420ec89
......@@ -1235,8 +1235,8 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return ret;
/* sanity checks */
if(!sc->stts_count || !sc->chunk_count || !sc->sample_to_chunk_sz ||
(!sc->sample_size && !sc->sample_count)){
if(sc->chunk_count && (!sc->stts_count || !sc->sample_to_chunk_sz ||
(!sc->sample_size && !sc->sample_count))){
av_log(c->fc, AV_LOG_ERROR, "stream %d, missing mandatory atoms, broken header\n",
st->index);
sc->sample_count = 0; //ignore track
......@@ -1456,8 +1456,6 @@ static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
sc = st->priv_data;
if (sc->pseudo_stream_id+1 != frag->stsd_id)
return 0;
if (!st->nb_index_entries)
return -1;
get_byte(pb); /* version */
flags = get_be24(pb);
entries = get_be32(pb);
......
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