[vlc-commits] demux: mkv: fix unnamed segments names

Francois Cartegnie git at videolan.org
Fri Mar 14 23:30:33 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Mar 14 23:26:28 2014 +0100| [5564e7b414af1df4005a70f4b4808540fb69a47a] | committer: Francois Cartegnie

demux: mkv: fix unnamed segments names

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

 modules/demux/mkv/demux.cpp |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index a0e8e89..c78c93b 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -660,7 +660,7 @@ void demux_sys_t::PreloadFamily( const matroska_segment_c & of_segment )
 // preload all the linked segments for all preloaded segments
 bool demux_sys_t::PreloadLinked()
 {
-    size_t i, j;
+    size_t i, j, ij = 0;
     virtual_segment_c *p_seg;
 
     p_current_segment = VirtualFromSegments( &opened_segments );
@@ -712,11 +712,12 @@ bool demux_sys_t::PreloadLinked()
                         }
 
                         if( !p_title->psz_name &&
-                            asprintf(&(p_title->psz_name), "%s %d", N_("Segment"), (int)i) == -1 )
+                            asprintf(&(p_title->psz_name), "%s %d", N_("Segment"), (int)ij) == -1 )
                             p_title->psz_name = NULL;
                     }
                 }
 
+                ij++;
                 i_chapters = 0;
                 p_ved->PublishChapters( *p_title, i_chapters, 0 );
 



More information about the vlc-commits mailing list