Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
43dec748
Commit
43dec748
authored
Mar 13, 2015
by
Steve Lhomme
Committed by
Jean-Baptiste Kempf
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MKV: remove unused i_time_offset variable when seeking
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
25b22720
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
11 deletions
+10
-11
modules/demux/mkv/chapter_command.cpp
modules/demux/mkv/chapter_command.cpp
+3
-3
modules/demux/mkv/demux.cpp
modules/demux/mkv/demux.cpp
+2
-2
modules/demux/mkv/mkv.cpp
modules/demux/mkv/mkv.cpp
+1
-2
modules/demux/mkv/virtual_segment.cpp
modules/demux/mkv/virtual_segment.cpp
+3
-3
modules/demux/mkv/virtual_segment.hpp
modules/demux/mkv/virtual_segment.hpp
+1
-1
No files found.
modules/demux/mkv/chapter_command.cpp
View file @
43dec748
...
@@ -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
;
}
}
}
}
...
...
modules/demux/mkv/demux.cpp
View file @
43dec748
...
@@ -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
);
}
}
}
}
...
...
modules/demux/mkv/mkv.cpp
View file @
43dec748
...
@@ -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 */
...
...
modules/demux/mkv/virtual_segment.cpp
View file @
43dec748
...
@@ -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
,
m
time_t
i_date
,
mtime_t
i_time_offset
,
void
virtual_segment_c
::
Seek
(
demux_t
&
demuxer
,
m
kv_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
)
{
{
...
...
modules/demux/mkv/virtual_segment.hpp
View file @
43dec748
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment