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
89c1460e
Commit
89c1460e
authored
Aug 25, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp4: correct support for name atom
Used for track title by iTunes/QT
parent
245aa586
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+24
-1
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+7
-0
No files found.
modules/demux/mp4/libmp4.c
View file @
89c1460e
...
...
@@ -2440,6 +2440,29 @@ static int MP4_ReadBox_drms( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT
(
1
);
}
static
int
MP4_ReadBox_name
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
MP4_READBOX_ENTER
(
MP4_Box_data_name_t
);
p_box
->
data
.
p_name
->
psz_text
=
malloc
(
p_box
->
i_size
+
1
-
8
);
/* +\0, -name, -size */
if
(
p_box
->
data
.
p_name
->
psz_text
==
NULL
)
MP4_READBOX_EXIT
(
0
);
memcpy
(
p_box
->
data
.
p_name
->
psz_text
,
p_peek
,
p_box
->
i_size
-
8
);
p_box
->
data
.
p_name
->
psz_text
[
p_box
->
i_size
-
8
]
=
'\0'
;
#ifdef MP4_VERBOSE
msg_Dbg
(
p_stream
,
"read box:
\"
name
\"
text=`%s'"
,
p_box
->
data
.
p_name
->
psz_text
);
#endif
MP4_READBOX_EXIT
(
1
);
}
static
void
MP4_FreeBox_name
(
MP4_Box_t
*
p_box
)
{
FREENULL
(
p_box
->
data
.
p_name
->
psz_text
);
}
static
int
MP4_ReadBox_0xa9xxx
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
uint16_t
i16
;
...
...
@@ -2895,7 +2918,6 @@ static const struct
{
FOURCC_user
,
MP4_ReadBox_drms
,
MP4_FreeBox_Common
},
{
FOURCC_key
,
MP4_ReadBox_drms
,
MP4_FreeBox_Common
},
{
FOURCC_iviv
,
MP4_ReadBox_drms
,
MP4_FreeBox_Common
},
{
FOURCC_name
,
MP4_ReadBox_drms
,
MP4_FreeBox_Common
},
{
FOURCC_priv
,
MP4_ReadBox_drms
,
MP4_FreeBox_Common
},
{
FOURCC_frma
,
MP4_ReadBox_frma
,
MP4_FreeBox_Common
},
{
FOURCC_skcr
,
MP4_ReadBox_skcr
,
MP4_FreeBox_Common
},
...
...
@@ -2939,6 +2961,7 @@ static const struct
/* iTunes/Quicktime meta info */
{
FOURCC_meta
,
MP4_ReadBox_meta
,
MP4_FreeBox_Common
},
{
FOURCC_name
,
MP4_ReadBox_name
,
MP4_FreeBox_name
},
/* found in smoothstreaming */
{
FOURCC_traf
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
},
...
...
modules/demux/mp4/libmp4.h
View file @
89c1460e
...
...
@@ -883,6 +883,12 @@ typedef struct
}
MP4_Box_data_0xa9xxx_t
;
typedef
struct
{
char
*
psz_text
;
}
MP4_Box_data_name_t
;
typedef
struct
{
uint32_t
i_entry_count
;
...
...
@@ -1042,6 +1048,7 @@ typedef union MP4_Box_data_s
MP4_Box_data_0xa9xxx_t
*
p_0xa9xxx
;
MP4_Box_data_chpl_t
*
p_chpl
;
MP4_Box_data_tref_generic_t
*
p_tref_generic
;
MP4_Box_data_name_t
*
p_name
;
void
*
p_data
;
/* for unknow type */
}
MP4_Box_data_t
;
...
...
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