[vlc-commits] demux: mp4: flag incomplete boxes
Francois Cartegnie
git at videolan.org
Wed Sep 24 22:35:15 CEST 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Sep 24 22:25:16 2014 +0200| [b648022cc477a325a349a06e586b2bd9bb7f7abb] | committer: Francois Cartegnie
demux: mp4: flag incomplete boxes
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b648022cc477a325a349a06e586b2bd9bb7f7abb
---
modules/demux/mp4/libmp4.c | 11 +++++++----
modules/demux/mp4/libmp4.h | 6 ++++++
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index a0e0c5e..be11d8d 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -3355,6 +3355,7 @@ unknown:
msg_Warn( p_stream,
"unknown box type c%3.3s (incompletely loaded)",
(char*)&p_box->i_type+1 );
+ p_box->e_flags |= BOX_FLAG_INCOMPLETE;
return 1;
}
@@ -3914,12 +3915,14 @@ static void MP4_BoxDumpStructure_Internal( stream_t *s,
}
if( MP4_BOX_TYPE_ASCII() )
snprintf( &str[i_level * 4], sizeof(str) - 4*i_level,
- "+ %4.4s size %"PRIu64" offset %ld",
- (char*)&p_box->i_type, p_box->i_size, p_box->i_pos );
+ "+ %4.4s size %"PRIu64" offset %ld%s",
+ (char*)&p_box->i_type, p_box->i_size, p_box->i_pos,
+ p_box->e_flags & BOX_FLAG_INCOMPLETE ? " (????)" : "" );
else
snprintf( &str[i_level * 4], sizeof(str) - 4*i_level,
- "+ c%3.3s size %"PRIu64" offset %ld",
- (char*)&p_box->i_type+1, p_box->i_size, p_box->i_pos );
+ "+ c%3.3s size %"PRIu64" offset %ld%s",
+ (char*)&p_box->i_type+1, p_box->i_size, p_box->i_pos,
+ p_box->e_flags & BOX_FLAG_INCOMPLETE ? " (????)" : "" );
msg_Dbg( s, "%s", str );
}
p_child = p_box->p_first;
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index d4b68a3..8e3195c 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -1376,6 +1376,12 @@ typedef struct MP4_Box_s
uint32_t i_type;
uint32_t i_shortsize;
+ enum
+ {
+ BOX_FLAG_NONE = 0,
+ BOX_FLAG_INCOMPLETE,
+ } e_flags;
+
UUID_t i_uuid; /* Set if i_type == "uuid" */
uint64_t i_size; /* always set so use it */
More information about the vlc-commits
mailing list