Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
d4f8c820
Commit
d4f8c820
authored
Jul 16, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* libmp4.c: MMhh .mp4 is 99.99% the same thing than .mov but not 100% :(((
* mp4.c: hdlr atom in the .mp4 and .mov way.
parent
24aecbe0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
10 deletions
+37
-10
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+26
-2
modules/mux/mp4.c
modules/mux/mp4.c
+11
-8
No files found.
modules/demux/mp4/libmp4.c
View file @
d4f8c820
...
@@ -729,15 +729,39 @@ static int MP4_ReadBox_mdhd( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
...
@@ -729,15 +729,39 @@ static int MP4_ReadBox_mdhd( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
static
int
MP4_ReadBox_hdlr
(
MP4_Stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
static
int
MP4_ReadBox_hdlr
(
MP4_Stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
{
int32_t
i_reserved
;
MP4_READBOX_ENTER
(
MP4_Box_data_hdlr_t
);
MP4_READBOX_ENTER
(
MP4_Box_data_hdlr_t
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_hdlr
);
MP4_GETVERSIONFLAGS
(
p_box
->
data
.
p_hdlr
);
MP4_GET
4BYTES
(
p_box
->
data
.
p_hdlr
->
i_predefined
);
MP4_GET
FOURCC
(
p_box
->
data
.
p_hdlr
->
i_predefined
);
MP4_GETFOURCC
(
p_box
->
data
.
p_hdlr
->
i_handler_type
);
MP4_GETFOURCC
(
p_box
->
data
.
p_hdlr
->
i_handler_type
);
MP4_GET4BYTES
(
i_reserved
);
MP4_GET4BYTES
(
i_reserved
);
MP4_GET4BYTES
(
i_reserved
);
p_box
->
data
.
p_hdlr
->
psz_name
=
calloc
(
sizeof
(
char
),
i_read
+
1
);
p_box
->
data
.
p_hdlr
->
psz_name
=
calloc
(
sizeof
(
char
),
i_read
+
1
);
memcpy
(
p_box
->
data
.
p_hdlr
->
psz_name
,
p_peek
,
i_read
);
/* Yes, I love .mp4 :( */
if
(
p_box
->
data
.
p_hdlr
->
i_predefined
==
VLC_FOURCC
(
'm'
,
'h'
,
'l'
,
'r'
)
)
{
uint8_t
i_len
;
int
i_copy
;
MP4_GET1BYTE
(
i_len
);
i_copy
=
__MIN
(
i_read
,
i_len
);
memcpy
(
p_box
->
data
.
p_hdlr
->
psz_name
,
p_peek
,
i_copy
);
p_box
->
data
.
p_hdlr
->
psz_name
[
i_copy
]
=
'\0'
;
}
else
{
memcpy
(
p_box
->
data
.
p_hdlr
->
psz_name
,
p_peek
,
i_read
);
p_box
->
data
.
p_hdlr
->
psz_name
[
i_read
]
=
'\0'
;
}
#ifdef MP4_VERBOSE
#ifdef MP4_VERBOSE
msg_Dbg
(
p_stream
->
s
,
"read box:
\"
hdlr
\"
hanler type %4.4s name %s"
,
msg_Dbg
(
p_stream
->
s
,
"read box:
\"
hdlr
\"
hanler type %4.4s name %s"
,
...
...
modules/mux/mp4.c
View file @
d4f8c820
...
@@ -1697,25 +1697,25 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
...
@@ -1697,25 +1697,25 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
/* handler reference */
/* handler reference */
hdlr
=
box_full_new
(
"hdlr"
,
0
,
0
);
hdlr
=
box_full_new
(
"hdlr"
,
0
,
0
);
bo_add_fourcc
(
hdlr
,
"mhlr"
);
// media handler
if
(
p_sys
->
b_mov
)
bo_add_fourcc
(
hdlr
,
"mhlr"
);
// media handler
else
bo_add_32be
(
hdlr
,
0
);
if
(
p_stream
->
fmt
.
i_cat
==
AUDIO_ES
)
if
(
p_stream
->
fmt
.
i_cat
==
AUDIO_ES
)
{
bo_add_fourcc
(
hdlr
,
"soun"
);
bo_add_fourcc
(
hdlr
,
"soun"
);
}
else
if
(
p_stream
->
fmt
.
i_cat
==
VIDEO_ES
)
else
if
(
p_stream
->
fmt
.
i_cat
==
VIDEO_ES
)
{
bo_add_fourcc
(
hdlr
,
"vide"
);
bo_add_fourcc
(
hdlr
,
"vide"
);
}
else
if
(
p_stream
->
fmt
.
i_cat
==
SPU_ES
)
else
if
(
p_stream
->
fmt
.
i_cat
==
SPU_ES
)
{
bo_add_fourcc
(
hdlr
,
"text"
);
bo_add_fourcc
(
hdlr
,
"text"
);
}
bo_add_32be
(
hdlr
,
0
);
// reserved
bo_add_32be
(
hdlr
,
0
);
// reserved
bo_add_32be
(
hdlr
,
0
);
// reserved
bo_add_32be
(
hdlr
,
0
);
// reserved
bo_add_32be
(
hdlr
,
0
);
// reserved
bo_add_32be
(
hdlr
,
0
);
// reserved
bo_add_8
(
hdlr
,
12
);
if
(
p_sys
->
b_mov
)
bo_add_8
(
hdlr
,
12
);
/* Pascal string for .mov */
if
(
p_stream
->
fmt
.
i_cat
==
AUDIO_ES
)
if
(
p_stream
->
fmt
.
i_cat
==
AUDIO_ES
)
bo_add_mem
(
hdlr
,
12
,
"SoundHandler"
);
bo_add_mem
(
hdlr
,
12
,
"SoundHandler"
);
else
if
(
p_stream
->
fmt
.
i_cat
==
VIDEO_ES
)
else
if
(
p_stream
->
fmt
.
i_cat
==
VIDEO_ES
)
...
@@ -1723,6 +1723,9 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
...
@@ -1723,6 +1723,9 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
else
else
bo_add_mem
(
hdlr
,
12
,
"Text Handler"
);
bo_add_mem
(
hdlr
,
12
,
"Text Handler"
);
if
(
!
p_sys
->
b_mov
)
bo_add_8
(
hdlr
,
0
);
/* asciiz string for .mp4, yes that's BRAIN DAMAGED F**K MP4 */
box_fix
(
hdlr
);
box_fix
(
hdlr
);
box_gather
(
mdia
,
hdlr
);
box_gather
(
mdia
,
hdlr
);
...
...
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