@@ -39,7 +39,7 @@ class MP4Parser {
39
39
const uint8_t * data =
40
40
nullptr ; // /< Pointer to box payload (not including header)
41
41
size_t data_size = 0 ; // /< Size of payload (not including header)
42
- size_t size = 0 ; // /< Size of payload (not including header)
42
+ size_t size = 0 ; // /< Size of payload including subboxes (not including header)
43
43
int level = 0 ; // /< Nesting depth
44
44
uint64_t offset = 0 ; // /< File offset where box starts
45
45
bool is_complete = false ; // /< True if the box data is complete
@@ -107,7 +107,6 @@ class MP4Parser {
107
107
fileOffset = 0 ;
108
108
levelStack.clear ();
109
109
box.is_complete = true ; // Start with no open box
110
- // box.data_buffer.reset();
111
110
box.data = nullptr ;
112
111
box.size = 0 ;
113
112
box.level = 0 ;
@@ -364,6 +363,7 @@ class MP4Parser {
364
363
bool isContainerBox (const char * type) {
365
364
// fill with default values if nothing has been defined
366
365
if (containers.empty ()) {
366
+ // pure containers
367
367
static const char * containers_str[] = {
368
368
" moov" , " trak" , " mdia" , " minf" , " stbl" , " edts" , " dinf" , " udta" ,
369
369
" ilst" , " moof" , " traf" , " mfra" , " tref" , " iprp" , " sinf" , " schi" };
@@ -373,6 +373,7 @@ class MP4Parser {
373
373
info.start = 0 ;
374
374
containers.push_back (info);
375
375
}
376
+ // container with data
376
377
ContainerInfo info;
377
378
info.name = " meta" ;
378
379
info.start = 4 ; // 4 bytes: version (1 byte) + flags (3 bytes)
@@ -397,18 +398,6 @@ class MP4Parser {
397
398
return 0 ;
398
399
}
399
400
400
- /* *
401
- * @brief Checks if a box type is a persisted box.
402
- * @param type Box type string.
403
- * @return true if persisted, false otherwise.
404
- */
405
- bool isPersistedBox (const char * type) const {
406
- static const char * persisted[] = {" stsz" };
407
- for (const char * p : persisted)
408
- if (StrView (type) == p) return true ;
409
- return false ;
410
- }
411
-
412
401
/* *
413
402
* @brief Checks if a type string is a valid 4-character box type.
414
403
* @param type Pointer to type string.
0 commit comments