[vlc-commits] mkv: add Segments from the same family to used_segments

Steve Lhomme git at videolan.org
Wed Mar 16 07:04:42 CET 2016


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Mar 15 15:46:02 2016 +0100| [7ef3a8e249819f66ec3422e32a1bb8aaee4cbd92] | committer: Jean-Baptiste Kempf

mkv: add Segments from the same family to used_segments

it is needed by chapter codec commands that need to know about other segments

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/mkv/demux.cpp |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index 6feae50..78eb219 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -660,6 +660,17 @@ bool demux_sys_t::PreloadLinked()
 
     used_segments.push_back( p_current_segment );
 
+    for ( i=1; i< opened_segments.size(); i++ )
+    {
+        /* add segments from the same family to used_segments */
+        if ( opened_segments[0]->SameFamily( *(opened_segments[i]) ) )
+        {
+            virtual_segment_c *p_virtual_segment = new (std::nothrow) virtual_segment_c( *(opened_segments[i]), opened_segments );
+            if ( p_virtual_segment != NULL )
+                used_segments.push_back( p_virtual_segment );
+        }
+    }
+
     // publish all editions of all usable segment
     for ( i=0; i< used_segments.size(); i++ )
     {



More information about the vlc-commits mailing list