[vlc-commits] mp4 mux: simplify stts box creation
Rafaël Carré
git at videolan.org
Sat Aug 24 18:24:35 CEST 2013
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sat Aug 24 17:22:23 2013 +0200| [dfbcc3fa7feccc9d1f343f6aca3ac5b407b67d19] | committer: Rafaël Carré
mp4 mux: simplify stts box creation
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dfbcc3fa7feccc9d1f343f6aca3ac5b407b67d19
---
modules/mux/mp4.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c
index 63013cd..be8a5e5 100644
--- a/modules/mux/mp4.c
+++ b/modules/mux/mp4.c
@@ -1151,19 +1151,10 @@ static bo_t *GetStblBox(sout_mux_t *p_mux, mp4_stream_t *p_stream)
else
i_timescale = CLOCK_FREQ;
- /* first, create quantified length */
- int64_t i_dts = 0, i_dts_deq = 0;
- for (unsigned i = 0 ; i < p_stream->i_entry_count; i++) {
- mp4_entry_t *e = &p_stream->entry[i];
-
- int64_t i_delta = e->i_length + i_dts - i_dts_deq;
- i_dts += e->i_length;
- e->i_length = i_delta * (int64_t)i_timescale / CLOCK_FREQ;
- i_dts_deq += i_delta;
- }
- /* then write encoded table */
unsigned i_index = 0;
for (unsigned i = 0; i < p_stream->i_entry_count; i_index++) {
+ p_stream->entry[i].i_length = p_stream->entry[i].i_length
+ * (int64_t)i_timescale / CLOCK_FREQ;
int i_first = i;
int64_t i_delta = p_stream->entry[i].i_length;
More information about the vlc-commits
mailing list