[vlc-commits] mux: mp4: don't create stss for subs

Francois Cartegnie git at videolan.org
Fri Jul 4 18:56:28 CEST 2014


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Jun 22 11:31:42 2014 +0200| [e51828d56dc1340adbe736b0c13d7d7d819e4485] | committer: Jean-Baptiste Kempf

mux: mp4: don't create stss for subs

(cherry picked from commit 7d7149c5a61c99aa86f0bc2717a485d6942d8fff)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/mux/mp4.c |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c
index 151e195..f066bc7 100644
--- a/modules/mux/mp4.c
+++ b/modules/mux/mp4.c
@@ -1497,15 +1497,20 @@ static bo_t *GetStblBox(sout_mux_t *p_mux, mp4_stream_t *p_stream)
     /* create stss table */
     bo_t *stss = NULL;
     i_index = 0;
-    for (unsigned i = 0; i < p_stream->i_entry_count; i++)
-        if (p_stream->entry[i].i_flags & BLOCK_FLAG_TYPE_I) {
-            if (stss == NULL) {
-                stss = box_full_new("stss", 0, 0);
-                bo_add_32be(stss, 0); /* fixed later */
+    if ( p_stream->fmt.i_cat == VIDEO_ES || p_stream->fmt.i_cat == AUDIO_ES )
+    {
+        for (unsigned i = 0; i < p_stream->i_entry_count; i++)
+        {
+            if (p_stream->entry[i].i_flags & BLOCK_FLAG_TYPE_I) {
+                if (stss == NULL) {
+                    stss = box_full_new("stss", 0, 0);
+                    bo_add_32be(stss, 0); /* fixed later */
+                }
+                bo_add_32be(stss, 1 + i);
+                i_index++;
             }
-            bo_add_32be(stss, 1 + i);
-            i_index++;
         }
+    }
 
     if (stss)
         bo_fix_32be(stss, 12, i_index);



More information about the vlc-commits mailing list