[vlc-commits] adaptive: smooth: fix muxing timescale

Francois Cartegnie git at videolan.org
Sat Jan 14 20:39:19 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Jan 14 20:38:01 2017 +0100| [d959b2abb7b8765a17f983c9b8439ba5116313a4] | committer: Francois Cartegnie

adaptive: smooth: fix muxing timescale

otherwise sidx/tftd offsets in media time are unusable

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

 modules/mux/mp4/libmp4mux.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c
index 2f0a55b..319cddd 100644
--- a/modules/mux/mp4/libmp4mux.c
+++ b/modules/mux/mp4/libmp4mux.c
@@ -1467,6 +1467,11 @@ bo_t * mp4mux_GetMoovBox(vlc_object_t *p_obj, mp4mux_trackinfo_t **pp_tracks, un
     uint32_t        i_movie_timescale = 90000;
     int64_t         i_timestamp = get_timestamp();
 
+    /* Important for smooth streaming where its (not muxed here) media time offsets
+     * are in timescale == track timescale */
+    if( i_tracks == 1 )
+        i_movie_timescale = pp_tracks[0]->i_timescale;
+
     moov = box_new("moov");
     if(!moov)
         return NULL;



More information about the vlc-commits mailing list