Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
317533a0
Commit
317533a0
authored
Aug 24, 2013
by
Rafaël Carré
Browse files
mp4 mux: avoid unnecessary conversion
parent
bfb716ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/mux/mp4.c
View file @
317533a0
...
...
@@ -1152,9 +1152,8 @@ static bo_t *GetStblBox(sout_mux_t *p_mux, mp4_stream_t *p_stream)
i_timescale
=
CLOCK_FREQ
;
/* first, create quantified length */
int64_t
i_dts
=
0
,
i_dts_q
=
0
;
int64_t
i_dts
=
0
,
i_dts_
de
q
=
0
;
for
(
unsigned
i
=
0
;
i
<
p_stream
->
i_entry_count
;
i
++
)
{
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
;
...
...
@@ -1162,7 +1161,7 @@ static bo_t *GetStblBox(sout_mux_t *p_mux, mp4_stream_t *p_stream)
p_stream
->
entry
[
i
].
i_length
=
i_delta
*
(
int64_t
)
i_timescale
/
CLOCK_FREQ
;
i_dts_q
+=
p_stream
->
entry
[
i
].
i_length
;
i_dts_
de
q
+=
i_delta
;
}
/* then write encoded table */
unsigned
i_index
=
0
;
...
...
Write
Preview
Supports
Markdown
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