[vlc-devel] [PATCH 4/8] mkv: explicitly tell which of the chapter is the one leaving in EnterAndLeave()

Steve Lhomme robux4 at videolabs.io
Wed Mar 16 13:43:27 CET 2016


---
 modules/demux/mkv/chapters.cpp        | 4 ++--
 modules/demux/mkv/chapters.hpp        | 2 +-
 modules/demux/mkv/virtual_segment.cpp | 4 ++--
 modules/demux/mkv/virtual_segment.hpp | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/demux/mkv/chapters.cpp b/modules/demux/mkv/chapters.cpp
index 6242143..1242908 100644
--- a/modules/demux/mkv/chapters.cpp
+++ b/modules/demux/mkv/chapters.cpp
@@ -180,9 +180,9 @@ bool chapter_item_c::Leave( bool b_do_subs )
     return f_result;
 }
 
-bool chapter_item_c::EnterAndLeave( chapter_item_c *p_item, bool b_final_enter )
+bool chapter_item_c::EnterAndLeave( chapter_item_c *p_leaving_chapter, bool b_final_enter )
 {
-    chapter_item_c *p_common_parent = p_item;
+    chapter_item_c *p_common_parent = p_leaving_chapter;
 
     // leave, up to a common parent
     while ( p_common_parent != NULL && !p_common_parent->ParentOf( *this ) )
diff --git a/modules/demux/mkv/chapters.hpp b/modules/demux/mkv/chapters.hpp
index 501c1cd..d42ee63 100644
--- a/modules/demux/mkv/chapters.hpp
+++ b/modules/demux/mkv/chapters.hpp
@@ -87,7 +87,7 @@ public:
 
     bool Enter( bool b_do_subchapters );
     bool Leave( bool b_do_subchapters );
-    bool EnterAndLeave( chapter_item_c *p_item, bool b_enter = true );
+    bool EnterAndLeave( chapter_item_c *p_leaving_chapter, bool b_enter = true );
 
   protected:
       bool EnterLeaveHelper_ (bool, bool(chapter_codec_cmds_c::*)(), bool(chapter_item_c::*)(bool));
diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index 74331c2..bda0883 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -473,12 +473,12 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux )
     return false;
 }
 
-bool virtual_chapter_c::EnterAndLeave( virtual_chapter_c *p_item, bool b_enter )
+bool virtual_chapter_c::EnterAndLeave( virtual_chapter_c *p_leaving_vchapter, bool b_enter )
 {
     if( !p_chapter )
         return false;
 
-    return p_chapter->EnterAndLeave( p_item->p_chapter, b_enter );
+    return p_chapter->EnterAndLeave( p_leaving_vchapter->p_chapter, b_enter );
 }
 
 void virtual_segment_c::Seek( demux_t & demuxer, mtime_t i_mk_date,
diff --git a/modules/demux/mkv/virtual_segment.hpp b/modules/demux/mkv/virtual_segment.hpp
index 3e1232f..4036d5e 100644
--- a/modules/demux/mkv/virtual_segment.hpp
+++ b/modules/demux/mkv/virtual_segment.hpp
@@ -49,7 +49,7 @@ public:
                                                      int64_t & usertime_offset, bool b_ordered );
 
     virtual_chapter_c* getSubChapterbyTimecode( int64_t time );
-    bool EnterAndLeave( virtual_chapter_c *p_item, bool b_enter = true );
+    bool EnterAndLeave( virtual_chapter_c *p_leaving_vchapter, bool b_enter = true );
     virtual_chapter_c * FindChapter( int64_t i_find_uid );
     int PublishChapters( input_title_t & title, int & i_user_chapters, int i_level );
 
-- 
2.7.2.windows.1



More information about the vlc-devel mailing list