Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
01adc95c
Commit
01adc95c
authored
Jun 13, 2010
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp4: call get_timestamp just once
parent
dedd7cd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
modules/mux/mp4.c
modules/mux/mp4.c
+13
-12
No files found.
modules/mux/mp4.c
View file @
01adc95c
...
...
@@ -1515,6 +1515,7 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
uint32_t
i_movie_timescale
=
90000
;
int64_t
i_movie_duration
=
0
;
int64_t
i_timestamp
=
get_timestamp
();
moov
=
box_new
(
"moov"
);
...
...
@@ -1533,16 +1534,16 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
if
(
!
p_sys
->
b_64_ext
)
{
mvhd
=
box_full_new
(
"mvhd"
,
0
,
0
);
bo_add_32be
(
mvhd
,
get_timestamp
()
);
// creation time
bo_add_32be
(
mvhd
,
get_timestamp
()
);
// modification time
bo_add_32be
(
mvhd
,
i_timestamp
);
// creation time
bo_add_32be
(
mvhd
,
i_timestamp
);
// modification time
bo_add_32be
(
mvhd
,
i_movie_timescale
);
// timescale
bo_add_32be
(
mvhd
,
i_movie_duration
);
// duration
}
else
{
mvhd
=
box_full_new
(
"mvhd"
,
1
,
0
);
bo_add_64be
(
mvhd
,
get_timestamp
()
);
// creation time
bo_add_64be
(
mvhd
,
get_timestamp
()
);
// modification time
bo_add_64be
(
mvhd
,
i_timestamp
);
// creation time
bo_add_64be
(
mvhd
,
i_timestamp
);
// modification time
bo_add_32be
(
mvhd
,
i_movie_timescale
);
// timescale
bo_add_64be
(
mvhd
,
i_movie_duration
);
// duration
}
...
...
@@ -1594,8 +1595,8 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
else
tkhd
=
box_full_new
(
"tkhd"
,
0
,
1
);
bo_add_32be
(
tkhd
,
get_timestamp
()
);
// creation time
bo_add_32be
(
tkhd
,
get_timestamp
()
);
// modification time
bo_add_32be
(
tkhd
,
i_timestamp
);
// creation time
bo_add_32be
(
tkhd
,
i_timestamp
);
// modification time
bo_add_32be
(
tkhd
,
p_stream
->
i_track_id
);
bo_add_32be
(
tkhd
,
0
);
// reserved 0
bo_add_32be
(
tkhd
,
p_stream
->
i_duration
*
...
...
@@ -1609,8 +1610,8 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
else
tkhd
=
box_full_new
(
"tkhd"
,
1
,
1
);
bo_add_64be
(
tkhd
,
get_timestamp
()
);
// creation time
bo_add_64be
(
tkhd
,
get_timestamp
()
);
// modification time
bo_add_64be
(
tkhd
,
i_timestamp
);
// creation time
bo_add_64be
(
tkhd
,
i_timestamp
);
// modification time
bo_add_32be
(
tkhd
,
p_stream
->
i_track_id
);
bo_add_32be
(
tkhd
,
0
);
// reserved 0
bo_add_64be
(
tkhd
,
p_stream
->
i_duration
*
...
...
@@ -1732,8 +1733,8 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
if
(
!
p_sys
->
b_64_ext
)
{
mdhd
=
box_full_new
(
"mdhd"
,
0
,
0
);
bo_add_32be
(
mdhd
,
get_timestamp
()
);
// creation time
bo_add_32be
(
mdhd
,
get_timestamp
()
);
// modification time
bo_add_32be
(
mdhd
,
i_timestamp
);
// creation time
bo_add_32be
(
mdhd
,
i_timestamp
);
// modification time
bo_add_32be
(
mdhd
,
i_timescale
);
// timescale
bo_add_32be
(
mdhd
,
p_stream
->
i_duration
*
(
int64_t
)
i_timescale
/
(
mtime_t
)
1000000
);
// duration
...
...
@@ -1741,8 +1742,8 @@ static bo_t *GetMoovBox( sout_mux_t *p_mux )
else
{
mdhd
=
box_full_new
(
"mdhd"
,
1
,
0
);
bo_add_64be
(
mdhd
,
get_timestamp
()
);
// creation time
bo_add_64be
(
mdhd
,
get_timestamp
()
);
// modification time
bo_add_64be
(
mdhd
,
i_timestamp
);
// creation time
bo_add_64be
(
mdhd
,
i_timestamp
);
// modification time
bo_add_32be
(
mdhd
,
i_timescale
);
// timescale
bo_add_64be
(
mdhd
,
p_stream
->
i_duration
*
(
int64_t
)
i_timescale
/
(
mtime_t
)
1000000
);
// duration
...
...
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