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
f67ec257
Commit
f67ec257
authored
Jan 26, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/mux/mp4.c: fixed recent screw-up in movie duration.
parent
9eca6a12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
23 deletions
+15
-23
modules/mux/mp4.c
modules/mux/mp4.c
+15
-23
No files found.
modules/mux/mp4.c
View file @
f67ec257
...
...
@@ -2,7 +2,7 @@
* mp4.c: mp4/mov muxer
*****************************************************************************
* Copyright (C) 2001, 2002, 2003 VideoLAN
* $Id: mp4.c,v 1.1
3 2004/01/25 18:53:07
gbazin Exp $
* $Id: mp4.c,v 1.1
4 2004/01/26 18:30:01
gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin at videolan dot org>
...
...
@@ -740,6 +740,17 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
moov
=
box_new
(
"moov"
);
/* Create general info */
for
(
i_trak
=
0
;
i_trak
<
p_sys
->
i_nb_streams
;
i_trak
++
)
{
mp4_stream_t
*
p_stream
=
p_sys
->
pp_streams
[
i_trak
];
i_movie_duration
=
__MAX
(
i_movie_duration
,
p_stream
->
i_duration
);
}
msg_Dbg
(
p_mux
,
"movie duration %ds"
,
(
uint32_t
)(
i_movie_duration
/
(
mtime_t
)
1000000
)
);
i_movie_duration
=
i_movie_duration
*
i_movie_timescale
/
1000000
;
/* *** add /moov/mvhd *** */
if
(
!
p_sys
->
b_64_ext
)
{
...
...
@@ -911,16 +922,11 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
bo_add_32be
(
hdlr
,
0
);
// reserved
bo_add_32be
(
hdlr
,
0
);
// reserved
bo_add_8
(
hdlr
,
12
);
if
(
p_stream
->
p_fmt
->
i_cat
==
AUDIO_ES
)
{
bo_add_8
(
hdlr
,
13
);
bo_add_mem
(
hdlr
,
13
,
"SoundHandler"
);
}
bo_add_mem
(
hdlr
,
12
,
"SoundHandler"
);
else
{
bo_add_8
(
hdlr
,
13
);
bo_add_mem
(
hdlr
,
13
,
"VideoHandler"
);
}
bo_add_mem
(
hdlr
,
12
,
"VideoHandler"
);
box_fix
(
hdlr
);
box_gather
(
mdia
,
hdlr
);
...
...
@@ -1013,22 +1019,8 @@ static void Close( vlc_object_t * p_this )
int
i_trak
;
uint64_t
i_moov_pos
;
uint32_t
i_movie_timescale
=
90000
;
int64_t
i_movie_duration
=
0
;
msg_Dbg
(
p_mux
,
"Close"
);
/* Create general info */
for
(
i_trak
=
0
;
i_trak
<
p_sys
->
i_nb_streams
;
i_trak
++
)
{
mp4_stream_t
*
p_stream
=
p_sys
->
pp_streams
[
i_trak
];
i_movie_duration
=
__MAX
(
i_movie_duration
,
p_stream
->
i_duration
);
}
msg_Dbg
(
p_mux
,
"movie duration %ds"
,
(
uint32_t
)(
i_movie_duration
/
(
mtime_t
)
1000000
)
);
i_movie_duration
=
i_movie_duration
*
i_movie_timescale
/
1000000
;
/* Update mdat size */
bo_init
(
&
bo
,
0
,
NULL
,
VLC_TRUE
);
if
(
p_sys
->
i_pos
-
p_sys
->
i_mdat_pos
>=
(((
uint64_t
)
1
)
<<
32
)
)
...
...
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