Mercurial > libavformat.hg
changeset 6173:1b9079c05f9a libavformat
Improve mov atom parsing debug message, print parent atom and size in decimal
author | bcoudurier |
---|---|
date | Fri, 25 Jun 2010 01:19:03 +0000 |
parents | b8c470fec3f7 |
children | 563496476a23 |
files | mov.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Thu Jun 24 17:59:49 2010 +0000 +++ b/mov.c Fri Jun 25 01:19:03 2010 +0000 @@ -266,8 +266,8 @@ a.type = get_le32(pb); } total_size += 8; - dprintf(c->fc, "type: %08x %.4s sz: %"PRIx64" %"PRIx64" %"PRIx64"\n", - a.type, (char*)&a.type, a.size, atom.size, total_size); + dprintf(c->fc, "type: %08x '%.4s' parent:'%.4s' sz: %"PRId64" %"PRId64" %"PRId64"\n", + a.type, (char*)&a.type, (char*)&atom.type, a.size, total_size, atom.size); if (a.size == 1) { /* 64 bit extended size */ a.size = get_be64(pb) - 8; total_size += 8; @@ -960,7 +960,7 @@ //Parsing Sample description table enum CodecID id; int dref_id = 1; - MOVAtom a = { 0 }; + MOVAtom a = { AV_RL32("stsd") }; int64_t start_pos = url_ftell(pb); int size = get_be32(pb); /* size */ uint32_t format = get_le32(pb); /* data format */ @@ -2366,7 +2366,7 @@ MOVContext *mov = s->priv_data; ByteIOContext *pb = s->pb; int err; - MOVAtom atom = { 0 }; + MOVAtom atom = { AV_RL32("root") }; mov->fc = s; /* .mov and .mp4 aren't streamable anyway (only progressive download if moov is before mdat) */ @@ -2430,7 +2430,7 @@ if (!sample) { mov->found_mdat = 0; if (!url_is_streamed(s->pb) || - mov_read_default(mov, s->pb, (MOVAtom){ 0, INT64_MAX }) < 0 || + mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 || url_feof(s->pb)) return AVERROR_EOF; dprintf(s, "read fragments, offset 0x%llx\n", url_ftell(s->pb));