[vlc-commits] mkv: p_current_segment can change after a call to UpdateCurrentToChapter()
Steve Lhomme
git at videolan.org
Wed Mar 16 07:04:41 CET 2016
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Mar 15 15:45:57 2016 +0100| [d5840509432867ac76ac29cbb054003f76e628ec] | committer: Jean-Baptiste Kempf
mkv: p_current_segment can change after a call to UpdateCurrentToChapter()
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d5840509432867ac76ac29cbb054003f76e628ec
---
modules/demux/mkv/mkv.cpp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 7d6979c..9e83ffb 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -713,13 +713,17 @@ static int Demux( demux_t *p_demux)
vlc_mutex_locker( &p_sys->lock_demuxer );
virtual_segment_c *p_vsegment = p_sys->p_current_segment;
- matroska_segment_c *p_segment = p_vsegment->CurrentSegment();
- if ( p_segment == NULL )
- return 0;
- if( p_sys->i_pts >= p_sys->i_start_pts )
+ if( p_sys->i_pts >= p_sys->i_start_pts )
+ {
if ( p_vsegment->UpdateCurrentToChapter( *p_demux ) )
return 1;
+ p_vsegment = p_sys->p_current_segment;
+ }
+
+ matroska_segment_c *p_segment = p_vsegment->CurrentSegment();
+ if ( p_segment == NULL )
+ return 0;
KaxBlock *block;
KaxSimpleBlock *simpleblock;
@@ -772,6 +776,7 @@ static int Demux( demux_t *p_demux)
delete block;
return 1;
}
+ p_vsegment = p_sys->p_current_segment;
}
if ( p_vsegment->CurrentEdition() &&
More information about the vlc-commits
mailing list