[vlc-commits] mux: mp4: fix stss samples grouping

Francois Cartegnie git at videolan.org
Mon Jun 2 21:35:08 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jun  2 21:09:25 2014 +0200| [1e1aebbc5ace6f2646edaf56bf14aefa0c11dde0] | committer: Francois Cartegnie

mux: mp4: fix stss samples grouping

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1e1aebbc5ace6f2646edaf56bf14aefa0c11dde0
---

 modules/mux/mp4.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c
index eff9226..8deb715 100644
--- a/modules/mux/mp4.c
+++ b/modules/mux/mp4.c
@@ -1396,17 +1396,15 @@ static bo_t *GetStblBox(sout_mux_t *p_mux, mp4_stream_t *p_stream)
 
     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;
+        mtime_t i_delta = p_stream->entry[i].i_length;
 
         for (; i < p_stream->i_entry_count; ++i)
             if (i == p_stream->i_entry_count || p_stream->entry[i].i_length != i_delta)
                 break;
 
         bo_add_32be(stts, i - i_first); // sample-count
-        bo_add_32be(stts, i_delta);     // sample-delta
+        bo_add_32be(stts, i_delta * i_timescale / CLOCK_FREQ ); // sample-delta
     }
     bo_fix_32be(stts, 12, i_index);
 



More information about the vlc-commits mailing list