[vlc-commits] mkv: separate the segment selection from the track copying
Steve Lhomme
git at videolan.org
Thu Mar 17 17:07:10 CET 2016
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Mar 17 16:53:00 2016 +0100| [df06ad55d8c4affb91ee82af93ab9a853387765b] | committer: Jean-Baptiste Kempf
mkv: separate the segment selection from the track copying
the order of UnSelect() and Select() is also inversed
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=df06ad55d8c4affb91ee82af93ab9a853387765b
---
modules/demux/mkv/virtual_segment.cpp | 10 ++++++----
modules/demux/mkv/virtual_segment.hpp | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index be9c5ef..8c04e7a 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -525,7 +525,11 @@ void virtual_segment_c::Seek( demux_t & demuxer, mtime_t i_mk_date,
}
if( &p_current_vchapter->segment != &p_vchapter->segment )
- ChangeSegment( p_current_vchapter->segment, p_vchapter->segment, i_mk_date );
+ {
+ ChangeSegment( p_current_vchapter->segment, p_vchapter->segment );
+ p_current_vchapter->segment.UnSelect();
+ p_vchapter->segment.Select( i_mk_date );
+ }
p_current_vchapter = p_vchapter;
p_vchapter->segment.Seek( i_mk_date, i_mk_time_offset, i_global_position );
}
@@ -659,7 +663,7 @@ void virtual_chapter_c::print()
}
#endif
-void virtual_segment_c::ChangeSegment( matroska_segment_c & old, matroska_segment_c & next, mtime_t i_mk_start_time )
+void virtual_segment_c::ChangeSegment( matroska_segment_c & old, matroska_segment_c & next )
{
size_t i, j;
char *sub_lang = NULL, *aud_lang = NULL;
@@ -728,6 +732,4 @@ void virtual_segment_c::ChangeSegment( matroska_segment_c & old, matroska_segmen
p_tk->b_forced = true;
}
}
- next.Select( i_mk_start_time );
- old.UnSelect();
}
diff --git a/modules/demux/mkv/virtual_segment.hpp b/modules/demux/mkv/virtual_segment.hpp
index 320f4dd..04be7c8 100644
--- a/modules/demux/mkv/virtual_segment.hpp
+++ b/modules/demux/mkv/virtual_segment.hpp
@@ -162,7 +162,7 @@ public:
void Seek( demux_t & demuxer, mtime_t i_mk_date,
virtual_chapter_c *p_vchapter, int64_t i_global_position );
private:
- void ChangeSegment( matroska_segment_c & p_old, matroska_segment_c & p_new, mtime_t i_mk_start_time );
+ void ChangeSegment( matroska_segment_c & p_old, matroska_segment_c & p_new );
};
#endif
More information about the vlc-commits
mailing list