[FFmpeg-cvslog] r23764 - trunk/libavformat/mov.c
bcoudurier
subversion
Fri Jun 25 03:19:03 CEST 2010
Author: bcoudurier
Date: Fri Jun 25 03:19:03 2010
New Revision: 23764
Log:
Improve mov atom parsing debug message, print parent atom and size in decimal
Modified:
trunk/libavformat/mov.c
Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c Fri Jun 25 00:13:52 2010 (r23763)
+++ trunk/libavformat/mov.c Fri Jun 25 03:19:03 2010 (r23764)
@@ -266,8 +266,8 @@ static int mov_read_default(MOVContext *
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,
//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(AVFormatConte
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(AVFormatConte
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));
More information about the ffmpeg-cvslog
mailing list