Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
bfb716ca
Commit
bfb716ca
authored
Aug 24, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp4 mux: generate constant frame rate files
parent
561b5a7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
modules/mux/mp4.c
modules/mux/mp4.c
+4
-4
No files found.
modules/mux/mp4.c
View file @
bfb716ca
...
...
@@ -1149,18 +1149,18 @@ static bo_t *GetStblBox(sout_mux_t *p_mux, mp4_stream_t *p_stream)
if
(
p_stream
->
fmt
.
i_cat
==
AUDIO_ES
)
i_timescale
=
p_stream
->
fmt
.
audio
.
i_rate
;
else
i_timescale
=
1001
;
i_timescale
=
CLOCK_FREQ
;
/* first, create quantified length */
int64_t
i_dts
=
0
,
i_dts_q
=
0
;
for
(
unsigned
i
=
0
;
i
<
p_stream
->
i_entry_count
;
i
++
)
{
int64_t
i_dts_deq
=
i_dts_q
*
INT64_C
(
1000000
)
/
(
int64_t
)
i_timescale
;
int64_t
i_dts_deq
=
i_dts_q
*
CLOCK_FREQ
/
(
int64_t
)
i_timescale
;
int64_t
i_delta
=
p_stream
->
entry
[
i
].
i_length
+
i_dts
-
i_dts_deq
;
i_dts
+=
p_stream
->
entry
[
i
].
i_length
;
p_stream
->
entry
[
i
].
i_length
=
i_delta
*
(
int64_t
)
i_timescale
/
INT64_C
(
1000000
)
;
i_delta
*
(
int64_t
)
i_timescale
/
CLOCK_FREQ
;
i_dts_q
+=
p_stream
->
entry
[
i
].
i_length
;
}
...
...
@@ -1279,7 +1279,7 @@ static bo_t *GetMoovBox(sout_mux_t *p_mux)
if
(
p_stream
->
fmt
.
i_cat
==
AUDIO_ES
)
i_timescale
=
p_stream
->
fmt
.
audio
.
i_rate
;
else
i_timescale
=
1001
;
i_timescale
=
CLOCK_FREQ
;
/* *** add /moov/trak *** */
bo_t
*
trak
=
box_new
(
"trak"
);
...
...
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