summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-06-25 01:19:03 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-06-25 01:19:03 +0000
commit3491866a4bdc753ea0d1aa4a4ed558a930b44547 (patch)
tree183d73cd9e4f5f743c4a92e1cc6d12743289f8c4
parent27d88069869e31ab48154bed2bc79c3546806e35 (diff)
Improve mov atom parsing debug message, print parent atom and size in decimal
Originally committed as revision 23764 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mov.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2edd27e440..4b88a6e5d9 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -266,8 +266,8 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
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 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
//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 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
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 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
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));