Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
de398e6b
Commit
de398e6b
authored
May 05, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: libmp4: set pf_free on specific struct allocation
drops the useless tables entries
parent
5da18afa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
486 additions
and
525 deletions
+486
-525
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+481
-521
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+5
-4
No files found.
modules/demux/mp4/libmp4.c
View file @
de398e6b
...
...
@@ -338,12 +338,6 @@ static int MP4_ReadBoxContainer( stream_t *p_stream, MP4_Box_t *p_container )
return
MP4_ReadBoxContainerChildren
(
p_stream
,
p_container
,
0
);
}
static
void
MP4_FreeBox_Common
(
MP4_Box_t
*
p_box
)
{
/* Up to now do nothing */
(
void
)
p_box
;
}
static
int
MP4_ReadBoxSkip
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
/* XXX sometime moov is hiden in a free box */
...
...
@@ -419,9 +413,14 @@ static int MP4_ReadBox_ilst( stream_t *p_stream, MP4_Box_t *p_box )
}
}
static
void
MP4_FreeBox_ftyp
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_ftyp
->
i_compatible_brands
);
}
static
int
MP4_ReadBox_ftyp
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_ftyp_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_ftyp_t
,
MP4_FreeBox_ftyp
);
MP4_GETFOURCC
(
p_box
->
data
.
p_ftyp
->
i_major_brand
);
MP4_GET4BYTES
(
p_box
->
data
.
p_ftyp
->
i_minor_version
);
...
...
@@ -448,11 +447,6 @@ static int MP4_ReadBox_ftyp( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_ftyp
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_ftyp
->
i_compatible_brands
);
}
static
int
MP4_ReadBox_mvhd
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
...
...
@@ -461,7 +455,7 @@ static int MP4_ReadBox_mvhd( stream_t *p_stream, MP4_Box_t *p_box )
char
s_modification_time
[
128
];
char
s_duration
[
128
];
#endif
MP4_READBOX_ENTER
(
MP4_Box_data_mvhd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_mvhd_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_mvhd
);
...
...
@@ -527,7 +521,7 @@ static int MP4_ReadBox_mvhd( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_mfhd
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_mfhd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_mfhd_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_mvhd
);
...
...
@@ -542,7 +536,7 @@ static int MP4_ReadBox_mfhd( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_tfxd
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_tfxd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_tfxd_t
,
NULL
);
MP4_Box_data_tfxd_t
*
p_tfxd_data
=
p_box
->
data
.
p_tfxd
;
MP4_GETVERSIONFLAGS
(
p_tfxd_data
);
...
...
@@ -571,9 +565,14 @@ static int MP4_ReadBox_tfxd( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_tfrf
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_tfrf
->
p_tfrf_data_fields
);
}
static
int
MP4_ReadBox_tfrf
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_tfxd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_tfxd_t
,
MP4_FreeBox_tfrf
);
MP4_Box_data_tfrf_t
*
p_tfrf_data
=
p_box
->
data
.
p_tfrf
;
MP4_GETVERSIONFLAGS
(
p_tfrf_data
);
...
...
@@ -619,14 +618,14 @@ static int MP4_ReadBox_tfrf( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_
tfrf
(
MP4_Box_t
*
p_box
)
static
void
MP4_FreeBox_
stra
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_
tfrf
->
p_tfrf_data_fields
);
FREENULL
(
p_box
->
data
.
p_
stra
->
CodecPrivateData
);
}
static
int
MP4_ReadBox_stra
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_stra_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_stra_t
,
MP4_FreeBox_stra
);
MP4_Box_data_stra_t
*
p_stra
=
p_box
->
data
.
p_stra
;
uint8_t
i_reserved
;
...
...
@@ -669,11 +668,6 @@ error:
MP4_READBOX_EXIT
(
0
);
}
static
void
MP4_FreeBox_stra
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_stra
->
CodecPrivateData
);
}
static
int
MP4_ReadBox_uuid
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
if
(
!
CmpUUID
(
&
p_box
->
i_uuid
,
&
TfrfBoxUUID
)
)
...
...
@@ -689,21 +683,14 @@ static int MP4_ReadBox_uuid( stream_t *p_stream, MP4_Box_t *p_box )
return
1
;
}
static
void
MP4_FreeBox_
uuid
(
MP4_Box_t
*
p_box
)
static
void
MP4_FreeBox_
sidx
(
MP4_Box_t
*
p_box
)
{
if
(
!
CmpUUID
(
&
p_box
->
i_uuid
,
&
TfrfBoxUUID
)
)
return
MP4_FreeBox_tfrf
(
p_box
);
if
(
!
CmpUUID
(
&
p_box
->
i_uuid
,
&
TfxdBoxUUID
)
)
return
MP4_FreeBox_Common
(
p_box
);
if
(
!
CmpUUID
(
&
p_box
->
i_uuid
,
&
SmooBoxUUID
)
)
return
MP4_FreeBox_Common
(
p_box
);
if
(
!
CmpUUID
(
&
p_box
->
i_uuid
,
&
StraBoxUUID
)
)
return
MP4_FreeBox_stra
(
p_box
);
FREENULL
(
p_box
->
data
.
p_sidx
->
p_items
);
}
static
int
MP4_ReadBox_sidx
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_sidx_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_sidx_t
,
MP4_FreeBox_sidx
);
MP4_Box_data_sidx_t
*
p_sidx_data
=
p_box
->
data
.
p_sidx
;
MP4_GETVERSIONFLAGS
(
p_sidx_data
);
...
...
@@ -759,14 +746,9 @@ static int MP4_ReadBox_sidx( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_sidx
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_sidx
->
p_items
);
}
static
int
MP4_ReadBox_tfhd
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_tfhd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_tfhd_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_tfhd
);
...
...
@@ -826,9 +808,14 @@ static int MP4_ReadBox_tfhd( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_trun
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_trun
->
p_samples
);
}
static
int
MP4_ReadBox_trun
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_trun_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_trun_t
,
MP4_FreeBox_trun
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_trun
);
...
...
@@ -876,14 +863,9 @@ static int MP4_ReadBox_trun( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_trun
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_trun
->
p_samples
);
}
static
int
MP4_ReadBox_tfdt
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_tfdt_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_tfdt_t
,
NULL
);
if
(
i_read
<
8
)
MP4_READBOX_EXIT
(
0
);
...
...
@@ -906,7 +888,7 @@ static int MP4_ReadBox_tkhd( stream_t *p_stream, MP4_Box_t *p_box )
char
s_modification_time
[
128
];
char
s_duration
[
128
];
#endif
MP4_READBOX_ENTER
(
MP4_Box_data_tkhd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_tkhd_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_tkhd
);
...
...
@@ -1001,7 +983,7 @@ static int MP4_ReadBox_load( stream_t *p_stream, MP4_Box_t *p_box )
{
if
(
p_box
->
i_size
!=
24
)
return
0
;
MP4_READBOX_ENTER
(
MP4_Box_data_load_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_load_t
,
NULL
);
MP4_GET4BYTES
(
p_box
->
data
.
p_load
->
i_start_time
);
MP4_GET4BYTES
(
p_box
->
data
.
p_load
->
i_duration
);
MP4_GET4BYTES
(
p_box
->
data
.
p_load
->
i_flags
);
...
...
@@ -1017,7 +999,7 @@ static int MP4_ReadBox_mdhd( stream_t *p_stream, MP4_Box_t *p_box )
char
s_modification_time
[
128
];
char
s_duration
[
128
];
#endif
MP4_READBOX_ENTER
(
MP4_Box_data_mdhd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_mdhd_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_mdhd
);
...
...
@@ -1056,13 +1038,17 @@ static int MP4_ReadBox_mdhd( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_hdlr
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_hdlr
->
psz_name
);
}
static
int
MP4_ReadBox_hdlr
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
int32_t
i_reserved
;
VLC_UNUSED
(
i_reserved
);
MP4_READBOX_ENTER
(
MP4_Box_data_hdlr_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_hdlr_t
,
MP4_FreeBox_hdlr
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_hdlr
);
...
...
@@ -1108,14 +1094,9 @@ static int MP4_ReadBox_hdlr( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_hdlr
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_hdlr
->
psz_name
);
}
static
int
MP4_ReadBox_vmhd
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_vmhd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_vmhd_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_vmhd
);
...
...
@@ -1137,7 +1118,7 @@ static int MP4_ReadBox_vmhd( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_smhd
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_smhd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_smhd_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_smhd
);
...
...
@@ -1157,7 +1138,7 @@ static int MP4_ReadBox_smhd( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_hmhd
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_hmhd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_hmhd_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_hmhd
);
...
...
@@ -1179,9 +1160,14 @@ static int MP4_ReadBox_hmhd( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_url
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_url
->
psz_location
);
}
static
int
MP4_ReadBox_url
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_url_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_url_t
,
MP4_FreeBox_url
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_url
);
MP4_GETSTRINGZ
(
p_box
->
data
.
p_url
->
psz_location
);
...
...
@@ -1194,15 +1180,15 @@ static int MP4_ReadBox_url( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_url
(
MP4_Box_t
*
p_box
)
static
void
MP4_FreeBox_urn
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_url
->
psz_location
);
FREENULL
(
p_box
->
data
.
p_urn
->
psz_name
);
FREENULL
(
p_box
->
data
.
p_urn
->
psz_location
);
}
static
int
MP4_ReadBox_urn
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_urn_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_urn_t
,
MP4_FreeBox_urn
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_urn
);
...
...
@@ -1216,15 +1202,10 @@ static int MP4_ReadBox_urn( stream_t *p_stream, MP4_Box_t *p_box )
#endif
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_urn
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_urn
->
psz_name
);
FREENULL
(
p_box
->
data
.
p_urn
->
psz_location
);
}
static
int
MP4_ReadBox_LtdContainer
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER_PARTIAL
(
MP4_Box_data_lcont_t
,
16
);
MP4_READBOX_ENTER_PARTIAL
(
MP4_Box_data_lcont_t
,
16
,
NULL
);
if
(
i_read
<
8
)
MP4_READBOX_EXIT
(
0
);
...
...
@@ -1268,7 +1249,7 @@ static void MP4_FreeBox_stts( MP4_Box_t *p_box )
static
int
MP4_ReadBox_stts
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_stts_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_stts_t
,
MP4_FreeBox_stts
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_stts
);
MP4_GET4BYTES
(
p_box
->
data
.
p_stts
->
i_entry_count
);
...
...
@@ -1310,7 +1291,7 @@ static void MP4_FreeBox_ctts( MP4_Box_t *p_box )
static
int
MP4_ReadBox_ctts
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_ctts_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_ctts_t
,
MP4_FreeBox_ctts
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_ctts
);
...
...
@@ -1377,7 +1358,7 @@ static int MP4_ReadBox_esds( stream_t *p_stream, MP4_Box_t *p_box )
unsigned
int
i_flags
;
unsigned
int
i_type
;
MP4_READBOX_ENTER
(
MP4_Box_data_esds_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_esds_t
,
MP4_FreeBox_esds
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_esds
);
...
...
@@ -1493,7 +1474,7 @@ static int MP4_ReadBox_hvcC( stream_t *p_stream, MP4_Box_t *p_box )
{
MP4_Box_data_hvcC_t
*
p_hvcC
;
MP4_READBOX_ENTER
(
MP4_Box_data_hvcC_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_hvcC_t
,
MP4_FreeBox_hvcC
);
p_hvcC
=
p_box
->
data
.
p_hvcC
;
p_hvcC
->
i_hvcC
=
i_read
;
...
...
@@ -1534,7 +1515,7 @@ static int MP4_ReadBox_avcC( stream_t *p_stream, MP4_Box_t *p_box )
MP4_Box_data_avcC_t
*
p_avcC
;
int
i
;
MP4_READBOX_ENTER
(
MP4_Box_data_avcC_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_avcC_t
,
MP4_FreeBox_avcC
);
p_avcC
=
p_box
->
data
.
p_avcC
;
p_avcC
->
i_avcC
=
i_read
;
...
...
@@ -1630,9 +1611,14 @@ error:
MP4_READBOX_EXIT
(
0
);
}
static
void
MP4_FreeBox_WMA2
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_WMA2
->
p_extra
);
}
static
int
MP4_ReadBox_WMA2
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_WMA2_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_WMA2_t
,
MP4_FreeBox_WMA2
);
MP4_Box_data_WMA2_t
*
p_WMA2
=
p_box
->
data
.
p_WMA2
;
...
...
@@ -1664,14 +1650,14 @@ error:
MP4_READBOX_EXIT
(
0
);
}
static
void
MP4_FreeBox_
WMA2
(
MP4_Box_t
*
p_box
)
static
void
MP4_FreeBox_
strf
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_
WMA2
->
p_extra
);
FREENULL
(
p_box
->
data
.
p_
strf
->
p_extra
);
}
static
int
MP4_ReadBox_strf
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_strf_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_strf_t
,
MP4_FreeBox_strf
);
MP4_Box_data_strf_t
*
p_strf
=
p_box
->
data
.
p_strf
;
...
...
@@ -1705,14 +1691,9 @@ error:
MP4_READBOX_EXIT
(
0
);
}
static
void
MP4_FreeBox_strf
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_strf
->
p_extra
);
}
static
int
MP4_ReadBox_ASF
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_ASF_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_ASF_t
,
NULL
);
MP4_Box_data_ASF_t
*
p_asf
=
p_box
->
data
.
p_asf
;
...
...
@@ -1725,9 +1706,15 @@ static int MP4_ReadBox_ASF( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_stsdext_chan
(
MP4_Box_t
*
p_box
)
{
MP4_Box_data_chan_t
*
p_chan
=
p_box
->
data
.
p_chan
;
free
(
p_chan
->
layout
.
p_descriptions
);
}
static
int
MP4_ReadBox_stsdext_chan
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_chan_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_chan_t
,
MP4_FreeBox_stsdext_chan
);
MP4_Box_data_chan_t
*
p_chan
=
p_box
->
data
.
p_chan
;
if
(
i_read
<
16
)
...
...
@@ -1772,15 +1759,9 @@ static int MP4_ReadBox_stsdext_chan( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_stsdext_chan
(
MP4_Box_t
*
p_box
)
{
MP4_Box_data_chan_t
*
p_chan
=
p_box
->
data
.
p_chan
;
free
(
p_chan
->
layout
.
p_descriptions
);
}
static
int
MP4_ReadBox_dec3
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_dec3_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_dec3_t
,
NULL
);
MP4_Box_data_dec3_t
*
p_dec3
=
p_box
->
data
.
p_dec3
;
...
...
@@ -1822,7 +1803,7 @@ static int MP4_ReadBox_dec3( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_dac3
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_Box_data_dac3_t
*
p_dac3
;
MP4_READBOX_ENTER
(
MP4_Box_data_dac3_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_dac3_t
,
NULL
);
p_dac3
=
p_box
->
data
.
p_dac3
;
...
...
@@ -1848,7 +1829,7 @@ static int MP4_ReadBox_dvc1( stream_t *p_stream, MP4_Box_t *p_box )
{
MP4_Box_data_dvc1_t
*
p_dvc1
;
MP4_READBOX_ENTER
(
MP4_Box_data_dvc1_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_dvc1_t
,
NULL
);
p_dvc1
=
p_box
->
data
.
p_dvc1
;
MP4_GET1BYTE
(
p_dvc1
->
i_profile_level
);
/* profile is on 4bits, level 3bits */
...
...
@@ -1881,7 +1862,7 @@ static int MP4_ReadBox_dvc1( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_fiel
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_Box_data_fiel_t
*
p_fiel
;
MP4_READBOX_ENTER
(
MP4_Box_data_fiel_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_fiel_t
,
NULL
);
p_fiel
=
p_box
->
data
.
p_fiel
;
if
(
i_read
<
2
)
MP4_READBOX_EXIT
(
0
);
...
...
@@ -1905,7 +1886,7 @@ static int MP4_ReadBox_fiel( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_enda
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_Box_data_enda_t
*
p_enda
;
MP4_READBOX_ENTER
(
MP4_Box_data_enda_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_enda_t
,
NULL
);
p_enda
=
p_box
->
data
.
p_enda
;
...
...
@@ -1918,10 +1899,15 @@ static int MP4_ReadBox_enda( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_sample_soun
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_sample_soun
->
p_qt_description
);
}
static
int
MP4_ReadBox_sample_soun
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
p_box
->
i_handler
=
ATOM_soun
;
MP4_READBOX_ENTER
(
MP4_Box_data_sample_soun_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_sample_soun_t
,
MP4_FreeBox_sample_soun
);
p_box
->
data
.
p_sample_soun
->
p_qt_description
=
NULL
;
/* Sanity check needed because the "wave" box does also contain an
...
...
@@ -2089,17 +2075,15 @@ static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_sample_soun
(
MP4_Box_t
*
p_box
)
void
MP4_FreeBox_sample_vide
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_sample_
soun
->
p_qt
_description
);
FREENULL
(
p_box
->
data
.
p_sample_
vide
->
p_qt_image
_description
);
}
int
MP4_ReadBox_sample_vide
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
p_box
->
i_handler
=
ATOM_vide
;
MP4_READBOX_ENTER
(
MP4_Box_data_sample_vide_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_sample_vide_t
,
MP4_FreeBox_sample_vide
);
for
(
unsigned
i
=
0
;
i
<
6
;
i
++
)
{
...
...
@@ -2177,16 +2161,10 @@ int MP4_ReadBox_sample_vide( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
void
MP4_FreeBox_sample_vide
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_sample_vide
->
p_qt_image_description
);
}
static
int
MP4_ReadBox_sample_mp4s
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
p_box
->
i_handler
=
ATOM_text
;
MP4_READBOX_ENTER_PARTIAL
(
MP4_Box_data_sample_text_t
,
16
);
MP4_READBOX_ENTER_PARTIAL
(
MP4_Box_data_sample_text_t
,
16
,
NULL
);
if
(
i_read
<
8
)
MP4_READBOX_EXIT
(
0
);
...
...
@@ -2203,7 +2181,7 @@ static int MP4_ReadBox_sample_text( stream_t *p_stream, MP4_Box_t *p_box )
int32_t
t
;
p_box
->
i_handler
=
ATOM_text
;
MP4_READBOX_ENTER
(
MP4_Box_data_sample_text_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_sample_text_t
,
NULL
);
MP4_GET4BYTES
(
p_box
->
data
.
p_sample_text
->
i_reserved1
);
MP4_GET2BYTES
(
p_box
->
data
.
p_sample_text
->
i_reserved2
);
...
...
@@ -2254,7 +2232,7 @@ static int MP4_ReadBox_sample_text( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_sample_tx3g
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
p_box
->
i_handler
=
ATOM_text
;
MP4_READBOX_ENTER
(
MP4_Box_data_sample_text_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_sample_text_t
,
NULL
);
MP4_GET4BYTES
(
p_box
->
data
.
p_sample_text
->
i_reserved1
);
MP4_GET2BYTES
(
p_box
->
data
.
p_sample_text
->
i_reserved2
);
...
...
@@ -2298,9 +2276,14 @@ static void MP4_FreeBox_sample_text( MP4_Box_t *p_box )
}
#endif
static
void
MP4_FreeBox_stsz
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_stsz
->
i_entry_size
);
}
static
int
MP4_ReadBox_stsz
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_stsz_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_stsz_t
,
MP4_FreeBox_stsz
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_stsz
);
...
...
@@ -2331,11 +2314,6 @@ static int MP4_ReadBox_stsz( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_stsz
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_stsz
->
i_entry_size
);
}
static
void
MP4_FreeBox_stsc
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_stsc
->
i_first_chunk
);
...
...
@@ -2345,7 +2323,7 @@ static void MP4_FreeBox_stsc( MP4_Box_t *p_box )
static
int
MP4_ReadBox_stsc
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_stsc_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_stsc_t
,
MP4_FreeBox_stsc
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_stsc
);
...
...
@@ -2379,9 +2357,14 @@ static int MP4_ReadBox_stsc( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_stco_co64
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_co64
->
i_chunk_offset
);
}
static
int
MP4_ReadBox_stco_co64
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_co64_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_co64_t
,
MP4_FreeBox_stco_co64
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_co64
);
...
...
@@ -2420,14 +2403,14 @@ static int MP4_ReadBox_stco_co64( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_st
co_co64
(
MP4_Box_t
*
p_box
)
static
void
MP4_FreeBox_st
ss
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_
co64
->
i_chunk_offset
);
FREENULL
(
p_box
->
data
.
p_
stss
->
i_sample_number
);
}
static
int
MP4_ReadBox_stss
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_stss_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_stss_t
,
MP4_FreeBox_stss
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_stss
);
...
...
@@ -2457,11 +2440,6 @@ static int MP4_ReadBox_stss( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_stss
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_stss
->
i_sample_number
);
}
static
void
MP4_FreeBox_stsh
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_stsh
->
i_shadowed_sample_number
);
...
...
@@ -2470,7 +2448,7 @@ static void MP4_FreeBox_stsh( MP4_Box_t *p_box )
static
int
MP4_ReadBox_stsh
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_stsh_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_stsh_t
,
MP4_FreeBox_stsh
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_stsh
);
...
...
@@ -2504,10 +2482,14 @@ static int MP4_ReadBox_stsh( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_stdp
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_stdp
->
i_priority
);
}
static
int
MP4_ReadBox_stdp
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_stdp_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_stdp_t
,
MP4_FreeBox_stdp
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_stdp
);
...
...
@@ -2530,11 +2512,6 @@ static int MP4_ReadBox_stdp( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_stdp
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_stdp
->
i_priority
);
}
static
void
MP4_FreeBox_padb
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_padb
->
i_reserved1
);
...
...
@@ -2547,7 +2524,7 @@ static int MP4_ReadBox_padb( stream_t *p_stream, MP4_Box_t *p_box )
{
uint32_t
count
;
MP4_READBOX_ENTER
(
MP4_Box_data_padb_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_padb_t
,
MP4_FreeBox_padb
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_padb
);
...
...
@@ -2598,7 +2575,7 @@ static void MP4_FreeBox_elst( MP4_Box_t *p_box )
static
int
MP4_ReadBox_elst
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_elst_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_elst_t
,
MP4_FreeBox_elst
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_elst
);
...
...
@@ -2654,12 +2631,17 @@ static int MP4_ReadBox_elst( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_cprt
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_cprt
->
psz_notice
);
}
static
int
MP4_ReadBox_cprt
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
uint16_t
i_language
;
bool
b_mac
;
MP4_READBOX_ENTER
(
MP4_Box_data_cprt_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_cprt_t
,
MP4_FreeBox_cprt
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_cprt
);
...
...
@@ -2677,15 +2659,9 @@ static int MP4_ReadBox_cprt( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_cprt
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_cprt
->
psz_notice
);
}
static
int
MP4_ReadBox_dcom
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_dcom_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_dcom_t
,
NULL
);
MP4_GETFOURCC
(
p_box
->
data
.
p_dcom
->
i_algorithm
);
#ifdef MP4_VERBOSE
...
...
@@ -2696,9 +2672,14 @@ static int MP4_ReadBox_dcom( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_cmvd
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_cmvd
->
p_data
);
}
static
int
MP4_ReadBox_cmvd
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_cmvd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_cmvd_t
,
MP4_FreeBox_cmvd
);
MP4_GET4BYTES
(
p_box
->
data
.
p_cmvd
->
i_uncompressed_size
);
...
...
@@ -2719,11 +2700,6 @@ static int MP4_ReadBox_cmvd( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_cmvd
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_cmvd
->
p_data
);
}
static
int
MP4_ReadBox_cmov
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
...
...
@@ -2841,10 +2817,15 @@ static int MP4_ReadBox_cmov( stream_t *p_stream, MP4_Box_t *p_box )
#endif
/* HAVE_ZLIB_H */
}
static
void
MP4_FreeBox_rdrf
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_rdrf
->
psz_ref
);
}
static
int
MP4_ReadBox_rdrf
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
uint32_t
i_len
;
MP4_READBOX_ENTER
(
MP4_Box_data_rdrf_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_rdrf_t
,
MP4_FreeBox_rdrf
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_rdrf
);
MP4_GETFOURCC
(
p_box
->
data
.
p_rdrf
->
i_ref_type
);
...
...
@@ -2878,15 +2859,11 @@ static int MP4_ReadBox_rdrf( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_rdrf
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_rdrf
->
psz_ref
);
}
static
int
MP4_ReadBox_rmdr
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_rmdr_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_rmdr_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_rmdr
);
...
...
@@ -2902,7 +2879,7 @@ static int MP4_ReadBox_rmdr( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_rmqu
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_rmqu_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_rmqu_t
,
NULL
);
MP4_GET4BYTES
(
p_box
->
data
.
p_rmqu
->
i_quality
);
...
...
@@ -2916,7 +2893,7 @@ static int MP4_ReadBox_rmqu( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_rmvc
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_rmvc_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_rmvc_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_rmvc
);
MP4_GETFOURCC
(
p_box
->
data
.
p_rmvc
->
i_gestaltType
);
...
...
@@ -2937,7 +2914,7 @@ static int MP4_ReadBox_rmvc( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_frma
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_frma_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_frma_t
,
NULL
);
MP4_GETFOURCC
(
p_box
->
data
.
p_frma
->
i_type
);
...
...
@@ -2951,7 +2928,7 @@ static int MP4_ReadBox_frma( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_skcr
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_skcr_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_skcr_t
,
NULL
);
MP4_GET4BYTES
(
p_box
->
data
.
p_skcr
->
i_init
);
MP4_GET4BYTES
(
p_box
->
data
.
p_skcr
->
i_encr
);
...
...
@@ -2977,9 +2954,14 @@ static int MP4_ReadBox_drms( stream_t *p_stream, MP4_Box_t *p_box )
return
1
;
}
static
void
MP4_FreeBox_String
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_string
->
psz_text
);
}
static
int
MP4_ReadBox_String
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_string_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_string_t
,
MP4_FreeBox_String
);
if
(
p_box
->
i_size
<
8
||
p_box
->
i_size
>
SIZE_MAX
)
MP4_READBOX_EXIT
(
0
);
...
...
@@ -2998,14 +2980,15 @@ static int MP4_ReadBox_String( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_
String
(
MP4_Box_t
*
p_box
)
static
void
MP4_FreeBox_
Binary
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_string
->
psz_text
);
FREENULL
(
p_box
->
data
.
p_binary
->
p_blob
);
p_box
->
data
.
p_binary
->
i_blob
=
0
;
}
static
int
MP4_ReadBox_Binary
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_binary_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_binary_t
,
MP4_FreeBox_Binary
);
i_read
=
__MIN
(
i_read
,
UINT32_MAX
);
if
(
i_read
>
0
)
{
...
...
@@ -3019,15 +3002,14 @@ static int MP4_ReadBox_Binary( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_
Binary
(
MP4_Box_t
*
p_box
)
static
void
MP4_FreeBox_
data
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_binary
->
p_blob
);
p_box
->
data
.
p_binary
->
i_blob
=
0
;
free
(
p_box
->
data
.
p_data
->
p_blob
);
}
static
int
MP4_ReadBox_data
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_data_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_data_t
,
MP4_FreeBox_data
);
MP4_Box_data_data_t
*
p_data
=
p_box
->
data
.
p_data
;
if
(
i_read
<
8
||
i_read
-
8
>
UINT32_MAX
)
...
...
@@ -3061,11 +3043,6 @@ static int MP4_ReadBox_data( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_data
(
MP4_Box_t
*
p_box
)
{
free
(
p_box
->
data
.
p_data
->
p_blob
);
}
static
int
MP4_ReadBox_Metadata
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
const
uint8_t
*
p_peek
;
...
...
@@ -3090,7 +3067,7 @@ static int MP4_ReadBox_chpl( stream_t *p_stream, MP4_Box_t *p_box )
uint32_t
i_dummy
;
VLC_UNUSED
(
i_dummy
);
int
i
;
MP4_READBOX_ENTER
(
MP4_Box_data_chpl_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_chpl_t
,
MP4_FreeBox_chpl
);
p_chpl
=
p_box
->
data
.
p_chpl
;
...
...
@@ -3159,9 +3136,14 @@ static int MP4_ReadBox_chpl( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_tref_generic
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_tref_generic
->
i_track_ID
);
}
static
int
MP4_ReadBox_tref_generic
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_tref_generic_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_tref_generic_t
,
MP4_FreeBox_tref_generic
);
p_box
->
data
.
p_tref_generic
->
i_track_ID
=
NULL
;
p_box
->
data
.
p_tref_generic
->
i_entry_count
=
i_read
/
sizeof
(
uint32_t
);
...
...
@@ -3181,14 +3163,17 @@ static int MP4_ReadBox_tref_generic( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_tref_generic
(
MP4_Box_t
*
p_box
)
static
void
MP4_FreeBox_keys
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_tref_generic
->
i_track_ID
);
for
(
uint32_t
i
=
0
;
i
<
p_box
->
data
.
p_keys
->
i_entry_count
;
i
++
)
free
(
p_box
->
data
.
p_keys
->
p_entries
[
i
].
psz_value
);
free
(
p_box
->
data
.
p_keys
->
p_entries
);
}
static
int
MP4_ReadBox_keys
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_keys_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_keys_t
,
MP4_FreeBox_keys
);
if
(
i_read
<
8
)
MP4_READBOX_EXIT
(
0
);
...
...
@@ -3233,13 +3218,6 @@ static int MP4_ReadBox_keys( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_keys
(
MP4_Box_t
*
p_box
)
{
for
(
uint32_t
i
=
0
;
i
<
p_box
->
data
.
p_keys
->
i_entry_count
;
i
++
)
free
(
p_box
->
data
.
p_keys
->
p_entries
[
i
].
psz_value
);
free
(
p_box
->
data
.
p_keys
->
p_entries
);
}
static
int
MP4_ReadBox_meta
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
uint8_t
meta_data
[
8
];
...
...
@@ -3278,7 +3256,7 @@ static int MP4_ReadBox_iods( stream_t *p_stream, MP4_Box_t *p_box )
char
i_unused
;
VLC_UNUSED
(
i_unused
);
MP4_READBOX_ENTER
(
MP4_Box_data_iods_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_iods_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_iods
);
MP4_GET1BYTE
(
i_unused
);
/* tag */
...
...
@@ -3309,7 +3287,7 @@ static int MP4_ReadBox_iods( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_pasp
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_pasp_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_pasp_t
,
NULL
);
MP4_GET4BYTES
(
p_box
->
data
.
p_pasp
->
i_horizontal_spacing
);
MP4_GET4BYTES
(
p_box
->
data
.
p_pasp
->
i_vertical_spacing
);
...
...
@@ -3326,7 +3304,7 @@ static int MP4_ReadBox_pasp( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_mehd
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_mehd_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_mehd_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_mehd
);
if
(
p_box
->
data
.
p_mehd
->
i_version
==
1
)
...
...
@@ -3345,7 +3323,7 @@ static int MP4_ReadBox_mehd( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_trex
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_trex_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_trex_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_trex
);
MP4_GET4BYTES
(
p_box
->
data
.
p_trex
->
i_track_ID
);
...
...
@@ -3363,10 +3341,15 @@ static int MP4_ReadBox_trex( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_sdtp
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_sdtp
->
p_sample_table
);
}
static
int
MP4_ReadBox_sdtp
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
uint32_t
i_sample_count
;
MP4_READBOX_ENTER
(
MP4_Box_data_sdtp_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_sdtp_t
,
MP4_FreeBox_sdtp
);
MP4_Box_data_sdtp_t
*
p_sdtp
=
p_box
->
data
.
p_sdtp
;
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_sdtp
);
i_sample_count
=
i_read
;
...
...
@@ -3393,14 +3376,9 @@ static int MP4_ReadBox_sdtp( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_sdtp
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_sdtp
->
p_sample_table
);
}
static
int
MP4_ReadBox_tsel
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_tsel_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_tsel_t
,
NULL
);
uint32_t
i_version
;
MP4_GET4BYTES
(
i_version
);
if
(
i_version
!=
0
||
i_read
<
4
)
...
...
@@ -3412,7 +3390,7 @@ static int MP4_ReadBox_tsel( stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_mfro
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_mfro_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_mfro_t
,
NULL
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_mfro
);
MP4_GET4BYTES
(
p_box
->
data
.
p_mfro
->
i_size
);
...
...
@@ -3426,6 +3404,15 @@ static int MP4_ReadBox_mfro( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_tfra
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_tfra
->
p_time
);
FREENULL
(
p_box
->
data
.
p_tfra
->
p_moof_offset
);
FREENULL
(
p_box
->
data
.
p_tfra
->
p_traf_number
);
FREENULL
(
p_box
->
data
.
p_tfra
->
p_trun_number
);
FREENULL
(
p_box
->
data
.
p_tfra
->
p_sample_number
);
}
static
int
MP4_ReadBox_tfra
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
#define READ_VARIABLE_LENGTH(lengthvar, p_array) switch (lengthvar)\
...
...
@@ -3448,7 +3435,7 @@ static int MP4_ReadBox_tfra( stream_t *p_stream, MP4_Box_t *p_box )
#define FIX_VARIABLE_LENGTH(lengthvar) if ( lengthvar == 3 ) lengthvar = 4
uint32_t
i_number_of_entries
;
MP4_READBOX_ENTER
(
MP4_Box_data_tfra_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_tfra_t
,
MP4_FreeBox_tfra
);
MP4_Box_data_tfra_t
*
p_tfra
=
p_box
->
data
.
p_tfra
;
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_tfra
);
if
(
p_tfra
->
i_version
>
1
)
...
...
@@ -3548,20 +3535,11 @@ error:
#undef FIX_VARIABLE_LENGTH
}
static
void
MP4_FreeBox_tfra
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_tfra
->
p_time
);
FREENULL
(
p_box
->
data
.
p_tfra
->
p_moof_offset
);
FREENULL
(
p_box
->
data
.
p_tfra
->
p_traf_number
);
FREENULL
(
p_box
->
data
.
p_tfra
->
p_trun_number
);
FREENULL
(
p_box
->
data
.
p_tfra
->
p_sample_number
);
}
static
int
MP4_ReadBox_pnot
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
if
(
p_box
->
i_size
!=
20
)
return
0
;
MP4_READBOX_ENTER
(
MP4_Box_data_pnot_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_pnot_t
,
NULL
);
MP4_GET4BYTES
(
p_box
->
data
.
p_pnot
->
i_date
);
uint16_t
i_version
;
MP4_GET2BYTES
(
i_version
);
...
...
@@ -3629,332 +3607,331 @@ static const struct
{
uint32_t
i_type
;
int
(
*
MP4_ReadBox_function
)(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
);
void
(
*
MP4_FreeBox_function
)(
MP4_Box_t
*
p_box
);
uint32_t
i_parent
;
/* set parent to restrict, duplicating if needed; 0 for any */
}
MP4_Box_Function
[]
=
{
/* Containers */
{
ATOM_moov
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
0
},
{
ATOM_foov
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
0
},
{
ATOM_trak
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_moov
},
{
ATOM_trak
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_foov
},
{
ATOM_mdia
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_trak
},
{
ATOM_moof
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
0
},
{
ATOM_minf
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_mdia
},
{
ATOM_stbl
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_minf
},
{
ATOM_dinf
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_minf
},
{
ATOM_dinf
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_meta
},
{
ATOM_edts
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_trak
},
{
ATOM_udta
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
0
},
{
ATOM_nmhd
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_minf
},
{
ATOM_hnti
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_udta
},
{
ATOM_rmra
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_moov
},
{
ATOM_rmda
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_rmra
},
{
ATOM_tref
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_trak
},
{
ATOM_gmhd
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_minf
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_stsd
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_mp4a
},
/* some quicktime mp4a/wave/mp4a.. */
{
ATOM_wave
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_WMA2
},
/* flip4mac */
{
ATOM_wave
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_in24
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_in32
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_fl32
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_fl64
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_QDMC
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_QDM2
},
{
ATOM_ilst
,
MP4_ReadBox_ilst
,
MP4_FreeBox_Common
,
ATOM_meta
},
{
ATOM_mvex
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_moov
},
{
ATOM_mvex
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_ftyp
},
{
ATOM_moov
,
MP4_ReadBoxContainer
,
0
},
{
ATOM_foov
,
MP4_ReadBoxContainer
,
0
},
{
ATOM_trak
,
MP4_ReadBoxContainer
,
ATOM_moov
},
{
ATOM_trak
,
MP4_ReadBoxContainer
,
ATOM_foov
},
{
ATOM_mdia
,
MP4_ReadBoxContainer
,
ATOM_trak
},
{
ATOM_moof
,
MP4_ReadBoxContainer
,
0
},
{
ATOM_minf
,
MP4_ReadBoxContainer
,
ATOM_mdia
},
{
ATOM_stbl
,
MP4_ReadBoxContainer
,
ATOM_minf
},
{
ATOM_dinf
,
MP4_ReadBoxContainer
,
ATOM_minf
},
{
ATOM_dinf
,
MP4_ReadBoxContainer
,
ATOM_meta
},
{
ATOM_edts
,
MP4_ReadBoxContainer
,
ATOM_trak
},
{
ATOM_udta
,
MP4_ReadBoxContainer
,
0
},
{
ATOM_nmhd
,
MP4_ReadBoxContainer
,
ATOM_minf
},
{
ATOM_hnti
,
MP4_ReadBoxContainer
,
ATOM_udta
},
{
ATOM_rmra
,
MP4_ReadBoxContainer
,
ATOM_moov
},
{
ATOM_rmda
,
MP4_ReadBoxContainer
,
ATOM_rmra
},
{
ATOM_tref
,
MP4_ReadBoxContainer
,
ATOM_trak
},
{
ATOM_gmhd
,
MP4_ReadBoxContainer
,
ATOM_minf
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
ATOM_stsd
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
ATOM_mp4a
},
/* some quicktime mp4a/wave/mp4a.. */
{
ATOM_wave
,
MP4_ReadBoxContainer
,
ATOM_WMA2
},
/* flip4mac */
{
ATOM_wave
,
MP4_ReadBoxContainer
,
ATOM_in24
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
ATOM_in32
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
ATOM_fl32
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
ATOM_fl64
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
ATOM_QDMC
},
{
ATOM_wave
,
MP4_ReadBoxContainer
,
ATOM_QDM2
},
{
ATOM_ilst
,
MP4_ReadBox_ilst
,
ATOM_meta
},
{
ATOM_mvex
,
MP4_ReadBoxContainer
,
ATOM_moov
},
{
ATOM_mvex
,
MP4_ReadBoxContainer
,
ATOM_ftyp
},
/* specific box */
{
ATOM_ftyp
,
MP4_ReadBox_ftyp
,
MP4_FreeBox_ftyp
,
0
},
{
ATOM_styp
,
MP4_ReadBox_ftyp
,
MP4_FreeBox_ftyp
,
0
},
{
ATOM_cmov
,
MP4_ReadBox_cmov
,
MP4_FreeBox_Common
,
0
},
{
ATOM_mvhd
,
MP4_ReadBox_mvhd
,
MP4_FreeBox_Common
,
ATOM_moov
},
{
ATOM_mvhd
,
MP4_ReadBox_mvhd
,
MP4_FreeBox_Common
,
ATOM_foov
},
{
ATOM_tkhd
,
MP4_ReadBox_tkhd
,
MP4_FreeBox_Common
,
ATOM_trak
},
{
ATOM_load
,
MP4_ReadBox_load
,
MP4_FreeBox_Common
,
ATOM_trak
},
{
ATOM_mdhd
,
MP4_ReadBox_mdhd
,
MP4_FreeBox_Common
,
ATOM_mdia
},
{
ATOM_hdlr
,
MP4_ReadBox_hdlr
,
MP4_FreeBox_hdlr
,
ATOM_mdia
},
{
ATOM_hdlr
,
MP4_ReadBox_hdlr
,
MP4_FreeBox_hdlr
,
ATOM_meta
},
{
ATOM_hdlr
,
MP4_ReadBox_hdlr
,
MP4_FreeBox_hdlr
,
ATOM_minf
},
{
ATOM_vmhd
,
MP4_ReadBox_vmhd
,
MP4_FreeBox_Common
,
ATOM_minf
},
{
ATOM_smhd
,
MP4_ReadBox_smhd
,
MP4_FreeBox_Common
,
ATOM_minf
},
{
ATOM_hmhd
,
MP4_ReadBox_hmhd
,
MP4_FreeBox_Common
,
ATOM_minf
},
{
ATOM_alis
,
MP4_ReadBoxSkip
,
MP4_FreeBox_Common
,
ATOM_dref
},
{
ATOM_url
,
MP4_ReadBox_url
,
MP4_FreeBox_url
,
0
},
{
ATOM_urn
,
MP4_ReadBox_urn
,
MP4_FreeBox_urn
,
0
},
{
ATOM_dref
,
MP4_ReadBox_LtdContainer
,
MP4_FreeBox_Common
,
0
},
{
ATOM_stts
,
MP4_ReadBox_stts
,
MP4_FreeBox_stts
,
ATOM_stbl
},
{
ATOM_ctts
,
MP4_ReadBox_ctts
,
MP4_FreeBox_ctts
,
ATOM_stbl
},
{
ATOM_stsd
,
MP4_ReadBox_LtdContainer
,
MP4_FreeBox_Common
,
ATOM_stbl
},
{
ATOM_stsz
,
MP4_ReadBox_stsz
,
MP4_FreeBox_stsz
,
ATOM_stbl
},
{
ATOM_stsc
,
MP4_ReadBox_stsc
,
MP4_FreeBox_stsc
,
ATOM_stbl
},
{
ATOM_stco
,
MP4_ReadBox_stco_co64
,
MP4_FreeBox_stco_co64
,
ATOM_stbl
},
{
ATOM_co64
,
MP4_ReadBox_stco_co64
,
MP4_FreeBox_stco_co64
,
ATOM_stbl
},
{
ATOM_stss
,
MP4_ReadBox_stss
,
MP4_FreeBox_stss
,
ATOM_stbl
},
{
ATOM_stsh
,
MP4_ReadBox_stsh
,
MP4_FreeBox_stsh
,
ATOM_stbl
},
{
ATOM_stdp
,
MP4_ReadBox_stdp
,
MP4_FreeBox_stdp
,
0
},
{
ATOM_padb
,
MP4_ReadBox_padb
,
MP4_FreeBox_padb
,
0
},
{
ATOM_elst
,
MP4_ReadBox_elst
,
MP4_FreeBox_elst
,
ATOM_edts
},
{
ATOM_cprt
,
MP4_ReadBox_cprt
,
MP4_FreeBox_cprt
,
0
},
{
ATOM_esds
,
MP4_ReadBox_esds
,
MP4_FreeBox_esds
,
ATOM_wave
},
/* mp4a in wave chunk */
{
ATOM_esds
,
MP4_ReadBox_esds
,
MP4_FreeBox_esds
,
ATOM_mp4a
},
{
ATOM_esds
,
MP4_ReadBox_esds
,
MP4_FreeBox_esds
,
ATOM_mp4v
},
{
ATOM_esds
,
MP4_ReadBox_esds
,
MP4_FreeBox_esds
,
ATOM_mp4s
},
{
ATOM_dcom
,
MP4_ReadBox_dcom
,
MP4_FreeBox_Common
,
0
},
{
ATOM_cmvd
,
MP4_ReadBox_cmvd
,
MP4_FreeBox_cmvd
,
0
},
{
ATOM_avcC
,
MP4_ReadBox_avcC
,
MP4_FreeBox_avcC
,
ATOM_avc1
},
{
ATOM_avcC
,
MP4_ReadBox_avcC
,
MP4_FreeBox_avcC
,
ATOM_avc3
},
{
ATOM_hvcC
,
MP4_ReadBox_hvcC
,
MP4_FreeBox_hvcC
,
0
},
{
ATOM_dac3
,
MP4_ReadBox_dac3
,
MP4_FreeBox_Common
,
0
},
{
ATOM_dec3
,
MP4_ReadBox_dec3
,
MP4_FreeBox_Common
,
0
},
{
ATOM_dvc1
,
MP4_ReadBox_dvc1
,
MP4_FreeBox_Common
,
0
},
{
ATOM_fiel
,
MP4_ReadBox_fiel
,
MP4_FreeBox_Common
,
0
},
{
ATOM_glbl
,
MP4_ReadBox_Binary
,
MP4_FreeBox_Binary
,
ATOM_FFV1
},
{
ATOM_enda
,
MP4_ReadBox_enda
,
MP4_FreeBox_Common
,
0
},
{
ATOM_iods
,
MP4_ReadBox_iods
,
MP4_FreeBox_Common
,
0
},
{
ATOM_pasp
,
MP4_ReadBox_pasp
,
MP4_FreeBox_Common
,
0
},
{
ATOM_keys
,
MP4_ReadBox_keys
,
MP4_FreeBox_keys
,
ATOM_meta
},
{
ATOM_ftyp
,
MP4_ReadBox_ftyp
,
0
},
{
ATOM_styp
,
MP4_ReadBox_ftyp
,
0
},
{
ATOM_cmov
,
MP4_ReadBox_cmov
,
0
},
{
ATOM_mvhd
,
MP4_ReadBox_mvhd
,
ATOM_moov
},
{
ATOM_mvhd
,
MP4_ReadBox_mvhd
,
ATOM_foov
},
{
ATOM_tkhd
,
MP4_ReadBox_tkhd
,
ATOM_trak
},
{
ATOM_load
,
MP4_ReadBox_load
,
ATOM_trak
},
{
ATOM_mdhd
,
MP4_ReadBox_mdhd
,
ATOM_mdia
},
{
ATOM_hdlr
,
MP4_ReadBox_hdlr
,
ATOM_mdia
},
{
ATOM_hdlr
,
MP4_ReadBox_hdlr
,
ATOM_meta
},
{
ATOM_hdlr
,
MP4_ReadBox_hdlr
,
ATOM_minf
},
{
ATOM_vmhd
,
MP4_ReadBox_vmhd
,
ATOM_minf
},
{
ATOM_smhd
,
MP4_ReadBox_smhd
,
ATOM_minf
},
{
ATOM_hmhd
,
MP4_ReadBox_hmhd
,
ATOM_minf
},
{
ATOM_alis
,
MP4_ReadBoxSkip
,
ATOM_dref
},
{
ATOM_url
,
MP4_ReadBox_url
,
0
},
{
ATOM_urn
,
MP4_ReadBox_urn
,
0
},
{
ATOM_dref
,
MP4_ReadBox_LtdContainer
,
0
},
{
ATOM_stts
,
MP4_ReadBox_stts
,
ATOM_stbl
},
{
ATOM_ctts
,
MP4_ReadBox_ctts
,
ATOM_stbl
},
{
ATOM_stsd
,
MP4_ReadBox_LtdContainer
,
ATOM_stbl
},
{
ATOM_stsz
,
MP4_ReadBox_stsz
,
ATOM_stbl
},
{
ATOM_stsc
,
MP4_ReadBox_stsc
,
ATOM_stbl
},
{
ATOM_stco
,
MP4_ReadBox_stco_co64
,
ATOM_stbl
},
{
ATOM_co64
,
MP4_ReadBox_stco_co64
,
ATOM_stbl
},
{
ATOM_stss
,
MP4_ReadBox_stss
,
ATOM_stbl
},
{
ATOM_stsh
,
MP4_ReadBox_stsh
,
ATOM_stbl
},
{
ATOM_stdp
,
MP4_ReadBox_stdp
,
0
},
{
ATOM_padb
,
MP4_ReadBox_padb
,
0
},
{
ATOM_elst
,
MP4_ReadBox_elst
,
ATOM_edts
},
{
ATOM_cprt
,
MP4_ReadBox_cprt
,
0
},
{
ATOM_esds
,
MP4_ReadBox_esds
,
ATOM_wave
},
/* mp4a in wave chunk */
{
ATOM_esds
,
MP4_ReadBox_esds
,
ATOM_mp4a
},
{
ATOM_esds
,
MP4_ReadBox_esds
,
ATOM_mp4v
},
{
ATOM_esds
,
MP4_ReadBox_esds
,
ATOM_mp4s
},
{
ATOM_dcom
,
MP4_ReadBox_dcom
,
0
},
{
ATOM_cmvd
,
MP4_ReadBox_cmvd
,
0
},
{
ATOM_avcC
,
MP4_ReadBox_avcC
,
ATOM_avc1
},
{
ATOM_avcC
,
MP4_ReadBox_avcC
,
ATOM_avc3
},
{
ATOM_hvcC
,
MP4_ReadBox_hvcC
,
0
},
{
ATOM_dac3
,
MP4_ReadBox_dac3
,
0
},
{
ATOM_dec3
,
MP4_ReadBox_dec3
,
0
},
{
ATOM_dvc1
,
MP4_ReadBox_dvc1
,
0
},
{
ATOM_fiel
,
MP4_ReadBox_fiel
,
0
},
{
ATOM_glbl
,
MP4_ReadBox_Binary
,
ATOM_FFV1
},
{
ATOM_enda
,
MP4_ReadBox_enda
,
0
},
{
ATOM_iods
,
MP4_ReadBox_iods
,
0
},
{
ATOM_pasp
,
MP4_ReadBox_pasp
,
0
},
{
ATOM_keys
,
MP4_ReadBox_keys
,
ATOM_meta
},
/* Quicktime preview atoms, all at root */
{
ATOM_pnot
,
MP4_ReadBox_pnot
,
MP4_FreeBox_Common
,
0
},
{
ATOM_pict
,
MP4_ReadBox_Binary
,
MP4_FreeBox_Binary
,
0
},
{
ATOM_PICT
,
MP4_ReadBox_Binary
,
MP4_FreeBox_Binary
,
0
},
{
ATOM_pnot
,
MP4_ReadBox_pnot
,
0
},
{
ATOM_pict
,
MP4_ReadBox_Binary
,
0
},
{
ATOM_PICT
,
MP4_ReadBox_Binary
,
0
},
/* Nothing to do with this box */
{
ATOM_mdat
,
MP4_ReadBoxSkip
,
MP4_FreeBox_Common
,
0
},
{
ATOM_skip
,
MP4_ReadBoxSkip
,
MP4_FreeBox_Common
,
0
},
{
ATOM_free
,
MP4_ReadBoxSkip
,
MP4_FreeBox_Common
,
0
},
{
ATOM_wide
,
MP4_ReadBoxSkip
,
MP4_FreeBox_Common
,
0
},
{
ATOM_binm
,
MP4_ReadBoxSkip
,
MP4_FreeBox_Common
,
0
},
{
ATOM_mdat
,
MP4_ReadBoxSkip
,
0
},
{
ATOM_skip
,
MP4_ReadBoxSkip
,
0
},
{
ATOM_free
,
MP4_ReadBoxSkip
,
0
},
{
ATOM_wide
,
MP4_ReadBoxSkip
,
0
},
{
ATOM_binm
,
MP4_ReadBoxSkip
,
0
},
/* Subtitles */
{
ATOM_tx3g
,
MP4_ReadBox_sample_tx3g
,
MP4_FreeBox_Common
,
0
},
//{ ATOM_text, MP4_ReadBox_sample_text,
MP4_FreeBox_Common,
0 },
{
ATOM_tx3g
,
MP4_ReadBox_sample_tx3g
,
0
},
//{ ATOM_text, MP4_ReadBox_sample_text, 0 },
/* for codecs */
{
ATOM_soun
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_agsm
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ac3
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_eac3
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_lpcm
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ms02
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ms11
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ms55
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM__mp3
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_mp4a
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_twos
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_sowt
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_QDMC
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_QDM2
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ima4
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_IMA4
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_dvi
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_alaw
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ulaw
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_raw
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_MAC3
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_MAC6
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_Qclp
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_samr
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_sawb
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_OggS
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_alac
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_WMA2
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
/* flip4mac */
{
ATOM_Opus
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
ATOM_stsd
},
{
ATOM_soun
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_agsm
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ac3
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_eac3
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_lpcm
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ms02
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ms11
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ms55
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM__mp3
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_mp4a
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_twos
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_sowt
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_QDMC
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_QDM2
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ima4
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_IMA4
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_dvi
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_alaw
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_ulaw
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_raw
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_MAC3
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_MAC6
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_Qclp
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_samr
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_sawb
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_OggS
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_alac
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
{
ATOM_WMA2
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
/* flip4mac */
{
ATOM_Opus
,
MP4_ReadBox_sample_soun
,
ATOM_stsd
},
/* Sound extensions */
{
ATOM_chan
,
MP4_ReadBox_stsdext_chan
,
MP4_FreeBox_stsdext_chan
,
0
},
{
ATOM_WMA2
,
MP4_ReadBox_WMA2
,
MP4_FreeBox_WMA2
,
ATOM_wave
},
/* flip4mac */
{
ATOM_dOps
,
MP4_ReadBox_Binary
,
MP4_FreeBox_Binary
,
ATOM_Opus
},
{
ATOM_drmi
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_vide
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_mp4v
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_SVQ1
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_SVQ3
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_ZyGo
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_DIVX
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_XVID
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_h263
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_s263
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_cvid
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3IV1
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3iv1
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3IV2
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3iv2
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3IVD
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3ivd
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3VID
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3vid
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_FFV1
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_mjpa
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_mjpb
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_qdrw
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_mp2v
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_hdv2
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_WMV3
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_mjqt
,
MP4_ReadBox_default
,
NULL
,
0
},
/* found in mjpa/b */
{
ATOM_mjht
,
MP4_ReadBox_default
,
NULL
,
0
},
{
ATOM_dvc
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_dvp
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_dv5n
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_dv5p
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_VP31
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_vp31
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_h264
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_jpeg
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_avc1
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_avc3
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
ATOM_stsd
},
{
ATOM_yv12
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
0
},
{
ATOM_yuv2
,
MP4_ReadBox_sample_vide
,
MP4_FreeBox_sample_vide
,
0
},
{
ATOM_strf
,
MP4_ReadBox_strf
,
MP4_FreeBox_strf
,
ATOM_WMV3
},
/* flip4mac */
{
ATOM_ASF
,
MP4_ReadBox_ASF
,
MP4_FreeBox_Common
,
ATOM_WMV3
},
/* flip4mac */
{
ATOM_ASF
,
MP4_ReadBox_ASF
,
MP4_FreeBox_Common
,
ATOM_wave
},
/* flip4mac */
{
ATOM_mp4s
,
MP4_ReadBox_sample_mp4s
,
MP4_FreeBox_Common
,
ATOM_stsd
},
{
ATOM_chan
,
MP4_ReadBox_stsdext_chan
,
0
},
{
ATOM_WMA2
,
MP4_ReadBox_WMA2
,
ATOM_wave
},
/* flip4mac */
{
ATOM_dOps
,
MP4_ReadBox_Binary
,
ATOM_Opus
},
{
ATOM_drmi
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_vide
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_mp4v
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_SVQ1
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_SVQ3
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_ZyGo
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_DIVX
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_XVID
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_h263
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_s263
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_cvid
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3IV1
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3iv1
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3IV2
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3iv2
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3IVD
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3ivd
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3VID
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_3vid
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_FFV1
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_mjpa
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_mjpb
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_qdrw
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_mp2v
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_hdv2
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_WMV3
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_mjqt
,
MP4_ReadBox_default
,
0
},
/* found in mjpa/b */
{
ATOM_mjht
,
MP4_ReadBox_default
,
0
},
{
ATOM_dvc
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_dvp
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_dv5n
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_dv5p
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_VP31
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_vp31
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_h264
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_jpeg
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_avc1
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_avc3
,
MP4_ReadBox_sample_vide
,
ATOM_stsd
},
{
ATOM_yv12
,
MP4_ReadBox_sample_vide
,
0
},
{
ATOM_yuv2
,
MP4_ReadBox_sample_vide
,
0
},
{
ATOM_strf
,
MP4_ReadBox_strf
,
ATOM_WMV3
},
/* flip4mac */
{
ATOM_ASF
,
MP4_ReadBox_ASF
,
ATOM_WMV3
},
/* flip4mac */
{
ATOM_ASF
,
MP4_ReadBox_ASF
,
ATOM_wave
},
/* flip4mac */
{
ATOM_mp4s
,
MP4_ReadBox_sample_mp4s
,
ATOM_stsd
},
/* XXX there is 2 box where we could find this entry stbl and tref*/
{
ATOM_hint
,
MP4_ReadBox_default
,
MP4_FreeBox_Common
,
0
},
{
ATOM_hint
,
MP4_ReadBox_default
,
0
},
/* found in tref box */
{
ATOM_dpnd
,
MP4_ReadBox_default
,
NULL
,
0
},
{
ATOM_ipir
,
MP4_ReadBox_default
,
NULL
,
0
},
{
ATOM_mpod
,
MP4_ReadBox_default
,
NULL
,
0
},
{
ATOM_chap
,
MP4_ReadBox_tref_generic
,
MP4_FreeBox_tref_generic
,
0
},
{
ATOM_dpnd
,
MP4_ReadBox_default
,
0
},
{
ATOM_ipir
,
MP4_ReadBox_default
,
0
},
{
ATOM_mpod
,
MP4_ReadBox_default
,
0
},
{
ATOM_chap
,
MP4_ReadBox_tref_generic
,
0
},
/* found in hnti */
{
ATOM_rtp
,
MP4_ReadBox_default
,
NULL
,
0
},
{
ATOM_rtp
,
MP4_ReadBox_default
,
0
},
/* found in rmra/rmda */
{
ATOM_rdrf
,
MP4_ReadBox_rdrf
,
MP4_FreeBox_rdrf
,
ATOM_rmda
},
{
ATOM_rmdr
,
MP4_ReadBox_rmdr
,
MP4_FreeBox_Common
,
ATOM_rmda
},
{
ATOM_rmqu
,
MP4_ReadBox_rmqu
,
MP4_FreeBox_Common
,
ATOM_rmda
},
{
ATOM_rmvc
,
MP4_ReadBox_rmvc
,
MP4_FreeBox_Common
,
ATOM_rmda
},
{
ATOM_drms
,
MP4_ReadBox_sample_soun
,
MP4_FreeBox_sample_soun
,
0
},
{
ATOM_sinf
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
0
},
{
ATOM_schi
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
0
},
{
ATOM_user
,
MP4_ReadBox_drms
,
MP4_FreeBox_Common
,
0
},
{
ATOM_key
,
MP4_ReadBox_drms
,
MP4_FreeBox_Common
,
0
},
{
ATOM_iviv
,
MP4_ReadBox_drms
,
MP4_FreeBox_Common
,
0
},
{
ATOM_priv
,
MP4_ReadBox_drms
,
MP4_FreeBox_Common
,
0
},
{
ATOM_frma
,
MP4_ReadBox_frma
,
MP4_FreeBox_Common
,
ATOM_sinf
},
/* and rinf */
{
ATOM_frma
,
MP4_ReadBox_frma
,
MP4_FreeBox_Common
,
ATOM_wave
},
/* flip4mac */
{
ATOM_skcr
,
MP4_ReadBox_skcr
,
MP4_FreeBox_Common
,
0
},
{
ATOM_rdrf
,
MP4_ReadBox_rdrf
,
ATOM_rmda
},
{
ATOM_rmdr
,
MP4_ReadBox_rmdr
,
ATOM_rmda
},
{
ATOM_rmqu
,
MP4_ReadBox_rmqu
,
ATOM_rmda
},
{
ATOM_rmvc
,
MP4_ReadBox_rmvc
,
ATOM_rmda
},
{
ATOM_drms
,
MP4_ReadBox_sample_soun
,
0
},
{
ATOM_sinf
,
MP4_ReadBoxContainer
,
0
},
{
ATOM_schi
,
MP4_ReadBoxContainer
,
0
},
{
ATOM_user
,
MP4_ReadBox_drms
,
0
},
{
ATOM_key
,
MP4_ReadBox_drms
,
0
},
{
ATOM_iviv
,
MP4_ReadBox_drms
,
0
},
{
ATOM_priv
,
MP4_ReadBox_drms
,
0
},
{
ATOM_frma
,
MP4_ReadBox_frma
,
ATOM_sinf
},
/* and rinf */
{
ATOM_frma
,
MP4_ReadBox_frma
,
ATOM_wave
},
/* flip4mac */
{
ATOM_skcr
,
MP4_ReadBox_skcr
,
0
},
/* ilst meta tags */
{
ATOM_0xa9ART
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9alb
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9cmt
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9com
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9day
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9des
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9enc
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9gen
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9grp
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9lyr
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9nam
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9too
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9trk
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9wrt
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_aART
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_atID
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
/* iTunes */
{
ATOM_cnID
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
/* iTunes */
{
ATOM_covr
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_disk
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_flvr
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_gnre
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_rtng
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_trkn
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_xid_
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_0xa9ART
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9alb
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9cmt
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9com
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9day
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9des
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9enc
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9gen
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9grp
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9lyr
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9nam
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9too
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9trk
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_0xa9wrt
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_aART
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_atID
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
/* iTunes */
{
ATOM_cnID
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
/* iTunes */
{
ATOM_covr
,
MP4_ReadBoxContainer
,
ATOM_ilst
},
{
ATOM_disk
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_flvr
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_gnre
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_rtng
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_trkn
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
{
ATOM_xid_
,
MP4_ReadBox_Metadata
,
ATOM_ilst
},
/* udta */
{
ATOM_0x40PRM
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0x40PRQ
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9ART
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9alb
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9ard
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9arg
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9aut
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9cak
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9cmt
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9con
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9com
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9cpy
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9day
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9des
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9dir
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9dis
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9dsa
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9fmt
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9gen
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9grp
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9hst
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9inf
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9isr
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9lab
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9lal
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9lnt
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9lyr
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9mak
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9mal
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9mod
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9nam
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9ope
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9phg
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9PRD
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9prd
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9prf
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9pub
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9req
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9sne
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9snm
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9sol
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9src
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9st3
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9swr
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9thx
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9too
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9trk
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9url
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9wrn
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9xpd
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0xa9xyz
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_chpl
,
MP4_ReadBox_chpl
,
MP4_FreeBox_chpl
,
ATOM_udta
},
/* nero unlabeled chapters list */
{
ATOM_MCPS
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_name
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_vndr
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_SDLN
,
MP4_ReadBox_String
,
MP4_FreeBox_String
,
ATOM_udta
},
{
ATOM_0x40PRM
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0x40PRQ
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9ART
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9alb
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9ard
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9arg
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9aut
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9cak
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9cmt
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9con
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9com
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9cpy
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9day
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9des
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9dir
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9dis
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9dsa
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9fmt
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9gen
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9grp
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9hst
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9inf
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9isr
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9lab
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9lal
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9lnt
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9lyr
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9mak
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9mal
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9mod
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9nam
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9ope
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9phg
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9PRD
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9prd
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9prf
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9pub
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9req
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9sne
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9snm
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9sol
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9src
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9st3
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9swr
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9thx
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9too
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9trk
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9url
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9wrn
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9xpd
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_0xa9xyz
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_chpl
,
MP4_ReadBox_chpl
,
ATOM_udta
},
/* nero unlabeled chapters list */
{
ATOM_MCPS
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_name
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_vndr
,
MP4_ReadBox_String
,
ATOM_udta
},
{
ATOM_SDLN
,
MP4_ReadBox_String
,
ATOM_udta
},
/* udta, non meta */
{
ATOM_tsel
,
MP4_ReadBox_tsel
,
MP4_FreeBox_Common
,
ATOM_udta
},
{
ATOM_tsel
,
MP4_ReadBox_tsel
,
ATOM_udta
},
/* iTunes/Quicktime meta info */
{
ATOM_meta
,
MP4_ReadBox_meta
,
MP4_FreeBox_Common
,
0
},
{
ATOM_data
,
MP4_ReadBox_data
,
MP4_FreeBox_data
,
0
},
{
ATOM_meta
,
MP4_ReadBox_meta
,
0
},
{
ATOM_data
,
MP4_ReadBox_data
,
0
},
/* found in smoothstreaming */
{
ATOM_traf
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_moof
},
{
ATOM_mfra
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
0
},
{
ATOM_mfhd
,
MP4_ReadBox_mfhd
,
MP4_FreeBox_Common
,
ATOM_moof
},
{
ATOM_sidx
,
MP4_ReadBox_sidx
,
MP4_FreeBox_sidx
,
0
},
{
ATOM_tfhd
,
MP4_ReadBox_tfhd
,
MP4_FreeBox_Common
,
ATOM_traf
},
{
ATOM_trun
,
MP4_ReadBox_trun
,
MP4_FreeBox_trun
,
ATOM_traf
},
{
ATOM_tfdt
,
MP4_ReadBox_tfdt
,
MP4_FreeBox_Common
,
ATOM_traf
},
{
ATOM_trex
,
MP4_ReadBox_trex
,
MP4_FreeBox_Common
,
ATOM_mvex
},
{
ATOM_mehd
,
MP4_ReadBox_mehd
,
MP4_FreeBox_Common
,
ATOM_mvex
},
{
ATOM_sdtp
,
MP4_ReadBox_sdtp
,
MP4_FreeBox_sdtp
,
0
},
{
ATOM_tfra
,
MP4_ReadBox_tfra
,
MP4_FreeBox_tfra
,
ATOM_mfra
},
{
ATOM_mfro
,
MP4_ReadBox_mfro
,
MP4_FreeBox_Common
,
ATOM_mfra
},
{
ATOM_uuid
,
MP4_ReadBox_uuid
,
MP4_FreeBox_uuid
,
0
},
{
ATOM_traf
,
MP4_ReadBoxContainer
,
ATOM_moof
},
{
ATOM_mfra
,
MP4_ReadBoxContainer
,
0
},
{
ATOM_mfhd
,
MP4_ReadBox_mfhd
,
ATOM_moof
},
{
ATOM_sidx
,
MP4_ReadBox_sidx
,
0
},
{
ATOM_tfhd
,
MP4_ReadBox_tfhd
,
ATOM_traf
},
{
ATOM_trun
,
MP4_ReadBox_trun
,
ATOM_traf
},
{
ATOM_tfdt
,
MP4_ReadBox_tfdt
,
ATOM_traf
},
{
ATOM_trex
,
MP4_ReadBox_trex
,
ATOM_mvex
},
{
ATOM_mehd
,
MP4_ReadBox_mehd
,
ATOM_mvex
},
{
ATOM_sdtp
,
MP4_ReadBox_sdtp
,
0
},
{
ATOM_tfra
,
MP4_ReadBox_tfra
,
ATOM_mfra
},
{
ATOM_mfro
,
MP4_ReadBox_mfro
,
ATOM_mfra
},
{
ATOM_uuid
,
MP4_ReadBox_uuid
,
0
},
/* Last entry */
{
0
,
MP4_ReadBox_default
,
NULL
,
0
}
{
0
,
MP4_ReadBox_default
,
0
}
};
...
...
@@ -4016,8 +3993,6 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father )
return
NULL
;
}
p_box
->
pf_free
=
MP4_Box_Function
[
i_index
].
MP4_FreeBox_function
;
return
p_box
;
}
...
...
@@ -4041,27 +4016,12 @@ void MP4_BoxFree( stream_t *s, MP4_Box_t *p_box )
p_child
=
p_next
;
}
/* Now search function to call */
if
(
p_box
->
pf_free
)
p_box
->
pf_free
(
p_box
);
if
(
p_box
->
data
.
p_payload
)
{
if
(
unlikely
(
p_box
->
pf_free
==
NULL
))
{
/* Should not happen */
if
MP4_BOX_TYPE_ASCII
()
msg_Warn
(
s
,
"cannot free box %4.4s, type unknown"
,
(
char
*
)
&
p_box
->
i_type
);
else
msg_Warn
(
s
,
"cannot free box c%3.3s, type unknown"
,
(
char
*
)
&
p_box
->
i_type
+
1
);
}
else
{
p_box
->
pf_free
(
p_box
);
}
free
(
p_box
->
data
.
p_payload
);
}
free
(
p_box
);
}
...
...
modules/demux/mp4/libmp4.h
View file @
de398e6b
...
...
@@ -1564,7 +1564,7 @@ static inline size_t mp4_box_headersize( MP4_Box_t *p_box )
p_str = NULL; \
}
#define MP4_READBOX_ENTER_PARTIAL( MP4_Box_data_TYPE_t, maxread ) \
#define MP4_READBOX_ENTER_PARTIAL( MP4_Box_data_TYPE_t, maxread
, release
) \
int64_t i_read = p_box->i_size; \
if( maxread < (uint64_t)i_read ) i_read = maxread;\
uint8_t *p_peek, *p_buff; \
...
...
@@ -1587,10 +1587,11 @@ static inline size_t mp4_box_headersize( MP4_Box_t *p_box )
{ \
free( p_buff ); \
return( 0 ); \
}
}\
p_box->pf_free = release;
#define MP4_READBOX_ENTER( MP4_Box_data_TYPE_t ) \
MP4_READBOX_ENTER_PARTIAL( MP4_Box_data_TYPE_t, p_box->i_size )
#define MP4_READBOX_ENTER( MP4_Box_data_TYPE_t
, release
) \
MP4_READBOX_ENTER_PARTIAL( MP4_Box_data_TYPE_t, p_box->i_size
, release
)
#define MP4_READBOX_EXIT( i_code ) \
do \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment