Commit 43dec748 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

MKV: remove unused i_time_offset variable when seeking

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 25b22720
...@@ -531,7 +531,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si ...@@ -531,7 +531,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
{ {
if ( !p_chapter->Enter( true ) ) if ( !p_chapter->Enter( true ) )
// jump to the location in the found segment // 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; f_result = true;
} }
...@@ -549,7 +549,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si ...@@ -549,7 +549,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
{ {
if ( !p_chapter->Enter( true ) ) if ( !p_chapter->Enter( true ) )
// jump to the location in the found segment // 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; f_result = true;
} }
...@@ -749,7 +749,7 @@ bool matroska_script_interpretor_c::Interpret( const binary * p_command, size_t ...@@ -749,7 +749,7 @@ bool matroska_script_interpretor_c::Interpret( const binary * p_command, size_t
else else
{ {
if ( !p_chapter->EnterAndLeave( sys.p_current_segment->CurrentChapter() ) ) 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; b_result = true;
} }
} }
......
...@@ -790,7 +790,7 @@ bool demux_sys_t::PreparePlayback( virtual_segment_c *p_new_segment ) ...@@ -790,7 +790,7 @@ bool demux_sys_t::PreparePlayback( virtual_segment_c *p_new_segment )
/* Seek to the beginning */ /* Seek to the beginning */
p_current_segment->Seek(p_current_segment->CurrentSegment()->sys.demuxer, p_current_segment->Seek(p_current_segment->CurrentSegment()->sys.demuxer,
0, 0, NULL, -1); 0, NULL, -1);
return true; return true;
} }
...@@ -808,7 +808,7 @@ void demux_sys_t::JumpTo( virtual_segment_c & vsegment, virtual_chapter_c * p_ch ...@@ -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 ) ) if ( !p_chapter->p_chapter || !p_chapter->p_chapter->Enter( true ) )
{ {
// jump to the location in the found segment // 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 );
} }
} }
......
...@@ -429,7 +429,6 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, virtual_ch ...@@ -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; demux_sys_t *p_sys = p_demux->p_sys;
virtual_segment_c *p_vsegment = p_sys->p_current_segment; virtual_segment_c *p_vsegment = p_sys->p_current_segment;
matroska_segment_c *p_segment = p_vsegment->CurrentSegment(); matroska_segment_c *p_segment = p_vsegment->CurrentSegment();
mtime_t i_time_offset = 0;
int64_t i_global_position = -1; int64_t i_global_position = -1;
int i_index; int i_index;
...@@ -481,7 +480,7 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, virtual_ch ...@@ -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 */ /* Needed by matroska_segment::Seek() and Seek */
......
...@@ -422,7 +422,7 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux ) ...@@ -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_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 )) ( 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; return true;
} }
} }
...@@ -462,7 +462,7 @@ bool virtual_chapter_c::EnterAndLeave( virtual_chapter_c *p_item, bool b_enter ) ...@@ -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 ); 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 ) virtual_chapter_c *p_chapter, int64_t i_global_position )
{ {
demux_sys_t *p_sys = demuxer.p_sys; 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_ ...@@ -475,7 +475,7 @@ void virtual_segment_c::Seek( demux_t & demuxer, mtime_t i_date, mtime_t i_time_
if ( p_chapter != NULL ) 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; 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 ) if ( p_chapter->p_chapter && p_chapter->i_seekpoint_num > 0 )
{ {
......
...@@ -155,7 +155,7 @@ public: ...@@ -155,7 +155,7 @@ public:
virtual_chapter_c * FindChapter( int64_t i_find_uid ); virtual_chapter_c * FindChapter( int64_t i_find_uid );
bool UpdateCurrentToChapter( demux_t & demux ); 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 ); virtual_chapter_c *p_chapter, int64_t i_global_position );
private: private:
void ChangeSegment( matroska_segment_c * p_old, matroska_segment_c * p_new, mtime_t i_start_time ); void ChangeSegment( matroska_segment_c * p_old, matroska_segment_c * p_new, mtime_t i_start_time );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment