summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-30 21:15:06 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-30 21:15:06 +0000
commit5e788d588be3454f6eaeb04e9fbb1008423221f4 (patch)
tree1b0840cbfcc9219c48b44ddf70034b44ab89e167 /libavformat/mov.c
parent44e43aab036595a8f6d78c9306864d00f35ebbb1 (diff)
support mp4 fragmented files without any samples in the moov atom
Originally committed as revision 12635 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0c232e6de3..3289334deb 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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);