[vlc-devel] [PATCH 08/34] mkv: removed unused/unnecessary argument to functions involved in seek

Filip Roséen filip at videolabs.io
Fri May 6 19:08:47 CEST 2016


The argument is not required, as such it has been removed.
---
 modules/demux/mkv/chapter_command.cpp  | 2 +-
 modules/demux/mkv/demux.cpp            | 4 ++--
 modules/demux/mkv/matroska_segment.hpp | 2 +-
 modules/demux/mkv/mkv.cpp              | 3 +--
 modules/demux/mkv/virtual_segment.cpp  | 4 ++--
 5 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/modules/demux/mkv/chapter_command.cpp b/modules/demux/mkv/chapter_command.cpp
index adcce3e..0df2ec5 100644
--- a/modules/demux/mkv/chapter_command.cpp
+++ b/modules/demux/mkv/chapter_command.cpp
@@ -726,7 +726,7 @@ bool matroska_script_interpretor_c::Interpret( const binary * p_command, size_t
         else
         {
             if ( !p_vchapter->EnterAndLeave( sys.p_current_vsegment->CurrentChapter() ) )
-                p_vsegment->Seek( sys.demuxer, p_vchapter->i_mk_virtual_start_time, p_vchapter, -1 );
+                p_vsegment->Seek( sys.demuxer, p_vchapter->i_mk_virtual_start_time, p_vchapter );
             b_result = true;
         }
     }
diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index ca50504..78ebd61 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -799,7 +799,7 @@ bool demux_sys_t::PreparePlayback( virtual_segment_c & new_vsegment, mtime_t i_m
 
     /* Seek to the beginning */
     p_current_vsegment->Seek(p_current_vsegment->CurrentSegment()->sys.demuxer,
-                             i_mk_date, p_current_vsegment->p_current_vchapter, -1);
+                             i_mk_date, p_current_vsegment->p_current_vchapter );
 
     return true;
 }
@@ -809,7 +809,7 @@ void demux_sys_t::JumpTo( virtual_segment_c & vsegment, virtual_chapter_c & vcha
     if ( !vchapter.p_chapter || !vchapter.p_chapter->Enter( true ) )
     {
         // jump to the location in the found segment
-        vsegment.Seek( demuxer, vchapter.i_mk_virtual_start_time, &vchapter, -1 );
+        vsegment.Seek( demuxer, vchapter.i_mk_virtual_start_time, &vchapter );
     }
 }
 
diff --git a/modules/demux/mkv/matroska_segment.hpp b/modules/demux/mkv/matroska_segment.hpp
index b19ba03..e86c1af 100644
--- a/modules/demux/mkv/matroska_segment.hpp
+++ b/modules/demux/mkv/matroska_segment.hpp
@@ -135,7 +135,7 @@ public:
     bool Preload();
     bool PreloadFamily( const matroska_segment_c & segment );
     void InformationCreate();
-    void Seek( mtime_t i_mk_date, mtime_t i_mk_time_offset, int64_t i_global_position );
+    void Seek( mtime_t i_mk_date, mtime_t i_mk_time_offset );
     int BlockGet( KaxBlock * &, KaxSimpleBlock * &, bool *, bool *, int64_t *);
 
     int BlockFindTrackIndex( size_t *pi_track,
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index f6e29c2..55d4e2d 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -443,7 +443,6 @@ static void Seek( demux_t *p_demux, mtime_t i_mk_date, double f_percent, virtual
     demux_sys_t        *p_sys = p_demux->p_sys;
     virtual_segment_c  *p_vsegment = p_sys->p_current_vsegment;
     matroska_segment_c *p_segment = p_vsegment->CurrentSegment();
-    int64_t            i_global_position = -1;
 
     if( f_percent < 0 ) msg_Dbg( p_demux, "seek request to i_pos = %" PRId64, i_mk_date );
     else                msg_Dbg( p_demux, "seek request to %.2f%%", f_percent * 100 );
@@ -501,7 +500,7 @@ static void Seek( demux_t *p_demux, mtime_t i_mk_date, double f_percent, virtual
             }
         }
     }
-    p_vsegment->Seek( *p_demux, i_mk_date, p_vchapter, i_global_position );
+    p_vsegment->Seek( *p_demux, i_mk_date, p_vchapter );
 }
 
 /* Needed by matroska_segment::Seek() and Seek */
diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index 8c72610..58e3fb7 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -458,7 +458,7 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux )
                     {
                         /* Forcing reset pcr */
                         es_out_Control( demux.out, ES_OUT_RESET_PCR);
-                        Seek( demux, p_cur_vchapter->i_mk_virtual_start_time, p_cur_vchapter, -1 );
+                        Seek( demux, p_cur_vchapter->i_mk_virtual_start_time, p_cur_vchapter );
                         return true;
                     }
                     sys.i_start_pts = p_cur_vchapter->i_mk_virtual_start_time + VLC_TS_0;
@@ -509,7 +509,7 @@ bool virtual_chapter_c::EnterAndLeave( virtual_chapter_c *p_leaving_vchapter, bo
 }
 
 void virtual_segment_c::Seek( demux_t & demuxer, mtime_t i_mk_date,
-                              virtual_chapter_c *p_vchapter, int64_t i_global_position )
+                              virtual_chapter_c *p_vchapter );
 {
     demux_sys_t *p_sys = demuxer.p_sys;
 
-- 
2.8.2



More information about the vlc-devel mailing list