]> git.sesse.net Git - vlc/commitdiff
MKV: remove unused i_time_offset variable when seeking
authorSteve Lhomme <robUx4@videolabs.io>
Fri, 13 Mar 2015 12:13:22 +0000 (13:13 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 13 Mar 2015 14:29:30 +0000 (15:29 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mkv/chapter_command.cpp
modules/demux/mkv/demux.cpp
modules/demux/mkv/mkv.cpp
modules/demux/mkv/virtual_segment.cpp
modules/demux/mkv/virtual_segment.hpp

index 00a75dab35184351b80beffc510891aa3b8bb966..defb95c65af99cd4b46edd6b2c4fc69cb9440c33 100644 (file)
@@ -531,7 +531,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
             {
                 if ( !p_chapter->Enter( true ) )
                     // jump to the location in the found segment
-                    sys.p_current_segment->Seek( sys.demuxer, p_chapter->i_virtual_start_time, -1, p_chapter, -1 );
+                    sys.p_current_segment->Seek( sys.demuxer, p_chapter->i_virtual_start_time, p_chapter, -1 );
 
                 f_result = true;
             }
@@ -549,7 +549,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
             {
                 if ( !p_chapter->Enter( true ) )
                     // jump to the location in the found segment
-                    sys.p_current_segment->Seek( sys.demuxer, p_chapter->i_virtual_start_time, -1, p_chapter, -1 );
+                    sys.p_current_segment->Seek( sys.demuxer, p_chapter->i_virtual_start_time, p_chapter, -1 );
 
                 f_result = true;
             }
@@ -749,7 +749,7 @@ bool matroska_script_interpretor_c::Interpret( const binary * p_command, size_t
         else
         {
             if ( !p_chapter->EnterAndLeave( sys.p_current_segment->CurrentChapter() ) )
-                p_segment->Seek( sys.demuxer, p_chapter->i_virtual_start_time, -1, p_chapter, -1 );
+                p_segment->Seek( sys.demuxer, p_chapter->i_virtual_start_time, p_chapter, -1 );
             b_result = true;
         }
     }
index b718d925d350f5f4a09ace70badb166e1a2214d0..21a25473caf8677f274c3c6add48372a44106a21 100644 (file)
@@ -790,7 +790,7 @@ bool demux_sys_t::PreparePlayback( virtual_segment_c *p_new_segment )
 
     /* Seek to the beginning */
     p_current_segment->Seek(p_current_segment->CurrentSegment()->sys.demuxer,
-                            0, 0, NULL, -1);
+                            0, NULL, -1);
 
     return true;
 }
@@ -808,7 +808,7 @@ void demux_sys_t::JumpTo( virtual_segment_c & vsegment, virtual_chapter_c * p_ch
         if ( !p_chapter->p_chapter || !p_chapter->p_chapter->Enter( true ) )
         {
             // jump to the location in the found segment
-            vsegment.Seek( demuxer, p_chapter->i_virtual_start_time, -1, p_chapter, -1 );
+            vsegment.Seek( demuxer, p_chapter->i_virtual_start_time, p_chapter, -1 );
         }
     }
 
index 101ca6c4e3c536d45b554f69a605152355e76281..212082e1f2a0ad4a95ac849b289a6812f033a072 100644 (file)
@@ -429,7 +429,6 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, virtual_ch
     demux_sys_t        *p_sys = p_demux->p_sys;
     virtual_segment_c  *p_vsegment = p_sys->p_current_segment;
     matroska_segment_c *p_segment = p_vsegment->CurrentSegment();
-    mtime_t            i_time_offset = 0;
     int64_t            i_global_position = -1;
 
     int         i_index;
@@ -481,7 +480,7 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, virtual_ch
             }
         }
     }
-    p_vsegment->Seek( *p_demux, i_date, i_time_offset, p_chapter, i_global_position );
+    p_vsegment->Seek( *p_demux, i_date, p_chapter, i_global_position );
 }
 
 /* Needed by matroska_segment::Seek() and Seek */
index d9d0dc0a6db7e86f9ab50ac34cb9aeb43abeca65..d0177737090dc10f6f1aeb70e329a7641b0fe883 100644 (file)
@@ -422,7 +422,7 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux )
                         ( p_current_chapter && p_current_chapter->p_segment != p_cur_chapter->p_segment ) ||
                         ( p_current_chapter->p_chapter->i_end_time != p_cur_chapter->p_chapter->i_start_time ))
                     {
-                        Seek( demux, p_cur_chapter->i_virtual_start_time, 0, p_cur_chapter, -1 );
+                        Seek( demux, p_cur_chapter->i_virtual_start_time, p_cur_chapter, -1 );
                         return true;
                     }
                 }
@@ -462,7 +462,7 @@ bool virtual_chapter_c::EnterAndLeave( virtual_chapter_c *p_item, bool b_enter )
     return p_chapter->EnterAndLeave( p_item->p_chapter, b_enter );
 }
 
-void virtual_segment_c::Seek( demux_t & demuxer, mtime_t i_date, mtime_t i_time_offset,
+void virtual_segment_c::Seek( demux_t & demuxer, mkv_time_t i_date,
                               virtual_chapter_c *p_chapter, int64_t i_global_position )
 {
     demux_sys_t *p_sys = demuxer.p_sys;
@@ -475,7 +475,7 @@ void virtual_segment_c::Seek( demux_t & demuxer, mtime_t i_date, mtime_t i_time_
 
     if ( p_chapter != NULL )
     {
-        i_time_offset = p_chapter->i_virtual_start_time - ( ( p_chapter->p_chapter )? p_chapter->p_chapter->i_start_time : 0 );
+        mtime_t i_time_offset = p_chapter->i_virtual_start_time - ( ( p_chapter->p_chapter )? p_chapter->p_chapter->i_start_time : 0 );
         p_sys->i_chapter_time = i_time_offset - p_chapter->p_segment->i_start_time;
         if ( p_chapter->p_chapter && p_chapter->i_seekpoint_num > 0 )
         {
index 46e9df27edcef993f8cc2d8bb0da10cfe341d9a1..5e9249b6e9980fa31f4a2eb1f42f6b87952f35b9 100644 (file)
@@ -155,7 +155,7 @@ public:
     virtual_chapter_c * FindChapter( int64_t i_find_uid );
 
     bool UpdateCurrentToChapter( demux_t & demux );
-    void Seek( demux_t & demuxer, mtime_t i_date, mtime_t i_time_offset,
+    void Seek( demux_t & demuxer, mtime_t i_date,
                virtual_chapter_c *p_chapter, int64_t i_global_position );
 private:
     void ChangeSegment( matroska_segment_c * p_old, matroska_segment_c * p_new, mtime_t i_start_time );