Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
7098f402
Commit
7098f402
authored
Feb 18, 2012
by
Denis Charmet
Committed by
Jean-Baptiste Kempf
Feb 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix seek in mka
Fix #6078 Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
c4f14cae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
20 deletions
+30
-20
modules/demux/mkv/matroska_segment.cpp
modules/demux/mkv/matroska_segment.cpp
+30
-20
No files found.
modules/demux/mkv/matroska_segment.cpp
View file @
7098f402
...
...
@@ -690,6 +690,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
mtime_t
i_pts
=
0
;
spoint
*
p_first
=
NULL
;
spoint
*
p_last
=
NULL
;
int
i_cat
;
if
(
i_global_position
>=
0
)
{
...
...
@@ -772,33 +773,42 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
es_out_Control
(
sys
.
demuxer
.
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
i_date
);
/* now parse until key frame */
for
(
i_track
=
0
;
i_track
<
tracks
.
size
();
i_track
++
)
const
int
es
[
3
]
=
{
VIDEO_ES
,
AUDIO_ES
,
SPU_ES
};
for
(
int
i
=
0
,
i_cat
=
es
[
0
];
i
<
2
;
i_cat
=
es
[
++
i
]
)
{
if
(
tracks
[
i_track
]
->
fmt
.
i_cat
==
VIDEO_ES
)
for
(
i_track
=
0
;
i_track
<
tracks
.
size
();
i_track
++
)
{
spoint
*
seekpoint
=
new
spoint
(
i_track
,
i_seek_time
,
i_seek_position
,
i_seek_position
);
if
(
unlikely
(
!
seekpoint
)
)
if
(
tracks
[
i_track
]
->
fmt
.
i_cat
==
i_cat
)
{
for
(
spoint
*
sp
=
p_first
;
sp
;
)
spoint
*
seekpoint
=
new
spoint
(
i_track
,
i_seek_time
,
i_seek_position
,
i_seek_position
);
if
(
unlikely
(
!
seekpoint
)
)
{
spoint
*
tmp
=
sp
;
sp
=
sp
->
p_next
;
delete
tmp
;
for
(
spoint
*
sp
=
p_first
;
sp
;
)
{
spoint
*
tmp
=
sp
;
sp
=
sp
->
p_next
;
delete
tmp
;
}
return
;
}
if
(
unlikely
(
!
p_first
)
)
{
p_first
=
seekpoint
;
p_last
=
seekpoint
;
}
else
{
p_last
->
p_next
=
seekpoint
;
p_last
=
seekpoint
;
}
return
;
}
if
(
unlikely
(
!
p_first
)
)
{
p_first
=
seekpoint
;
p_last
=
seekpoint
;
}
else
{
p_last
->
p_next
=
seekpoint
;
p_last
=
seekpoint
;
}
}
if
(
likely
(
p_first
)
)
break
;
}
/*Neither video nor audio track... no seek further*/
if
(
unlikely
(
!
p_first
)
)
return
;
while
(
i_pts
<
i_date
)
{
...
...
@@ -825,7 +835,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
i_pts
=
sys
.
i_chapter_time
+
block
->
GlobalTimecode
()
/
(
mtime_t
)
1000
;
if
(
i_track
<
tracks
.
size
()
)
{
if
(
tracks
[
i_track
]
->
fmt
.
i_cat
==
VIDEO_ES
&&
b_key_picture
)
if
(
tracks
[
i_track
]
->
fmt
.
i_cat
==
i_cat
&&
b_key_picture
)
{
/* get the seekpoint */
spoint
*
sp
;
...
...
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