Commit b648022c authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: flag incomplete boxes

parent ddcf5d1c
...@@ -3355,6 +3355,7 @@ unknown: ...@@ -3355,6 +3355,7 @@ unknown:
msg_Warn( p_stream, msg_Warn( p_stream,
"unknown box type c%3.3s (incompletely loaded)", "unknown box type c%3.3s (incompletely loaded)",
(char*)&p_box->i_type+1 ); (char*)&p_box->i_type+1 );
p_box->e_flags |= BOX_FLAG_INCOMPLETE;
return 1; return 1;
} }
...@@ -3914,12 +3915,14 @@ static void MP4_BoxDumpStructure_Internal( stream_t *s, ...@@ -3914,12 +3915,14 @@ static void MP4_BoxDumpStructure_Internal( stream_t *s,
} }
if( MP4_BOX_TYPE_ASCII() ) if( MP4_BOX_TYPE_ASCII() )
snprintf( &str[i_level * 4], sizeof(str) - 4*i_level, snprintf( &str[i_level * 4], sizeof(str) - 4*i_level,
"+ %4.4s size %"PRIu64" offset %ld", "+ %4.4s size %"PRIu64" offset %ld%s",
(char*)&p_box->i_type, p_box->i_size, p_box->i_pos ); (char*)&p_box->i_type, p_box->i_size, p_box->i_pos,
p_box->e_flags & BOX_FLAG_INCOMPLETE ? " (????)" : "" );
else else
snprintf( &str[i_level * 4], sizeof(str) - 4*i_level, snprintf( &str[i_level * 4], sizeof(str) - 4*i_level,
"+ c%3.3s size %"PRIu64" offset %ld", "+ c%3.3s size %"PRIu64" offset %ld%s",
(char*)&p_box->i_type+1, p_box->i_size, p_box->i_pos ); (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 ); msg_Dbg( s, "%s", str );
} }
p_child = p_box->p_first; p_child = p_box->p_first;
......
...@@ -1376,6 +1376,12 @@ typedef struct MP4_Box_s ...@@ -1376,6 +1376,12 @@ typedef struct MP4_Box_s
uint32_t i_type; uint32_t i_type;
uint32_t i_shortsize; uint32_t i_shortsize;
enum
{
BOX_FLAG_NONE = 0,
BOX_FLAG_INCOMPLETE,
} e_flags;
UUID_t i_uuid; /* Set if i_type == "uuid" */ UUID_t i_uuid; /* Set if i_type == "uuid" */
uint64_t i_size; /* always set so use it */ uint64_t i_size; /* always set so use it */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment