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
48a518b8
Commit
48a518b8
authored
Jan 20, 2016
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: ts: fix incorrect seek times
parent
9f6d6486
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
modules/demux/mpeg/ts.c
modules/demux/mpeg/ts.c
+11
-8
No files found.
modules/demux/mpeg/ts.c
View file @
48a518b8
...
...
@@ -1524,11 +1524,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{
int64_t
i_time
,
i_length
;
if
(
!
DVBEventInformation
(
p_demux
,
&
i_time
,
&
i_length
)
&&
i_length
>
0
&&
!
SeekToTime
(
p_demux
,
p_pmt
,
TO_SCALE
(
i_length
)
*
f
)
)
i_length
>
0
&&
!
SeekToTime
(
p_demux
,
p_pmt
,
(
int64_t
)(
TO_SCALE
(
i_length
)
*
f
)
)
)
{
ReadyQueuesPostSeek
(
p_demux
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
TO_SCALE
(
i_length
)
*
f
);
(
int64_t
)(
TO_SCALE
(
i_length
)
*
f
)
);
return
VLC_SUCCESS
;
}
}
...
...
@@ -1538,14 +1538,17 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
p_pmt
->
pcr
.
i_first
>
-
1
&&
p_pmt
->
i_last_dts
>
VLC_TS_INVALID
&&
p_pmt
->
pcr
.
i_current
>
-
1
)
{
double
i_length
=
TimeStampWrapAround
(
p_pmt
,
int64_t
i_length
=
TimeStampWrapAround
(
p_pmt
,
p_pmt
->
i_last_dts
)
-
p_pmt
->
pcr
.
i_first
;
if
(
!
SeekToTime
(
p_demux
,
p_pmt
,
p_pmt
->
pcr
.
i_first
+
i_length
*
f
)
)
i64
=
p_pmt
->
pcr
.
i_first
+
(
int64_t
)(
i_length
*
f
);
if
(
i64
<=
p_pmt
->
i_last_dts
)
{
ReadyQueuesPostSeek
(
p_demux
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
FROM_SCALE
(
p_pmt
->
pcr
.
i_first
+
i_length
*
f
)
);
return
VLC_SUCCESS
;
if
(
!
SeekToTime
(
p_demux
,
p_pmt
,
i64
)
)
{
ReadyQueuesPostSeek
(
p_demux
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_NEXT_DISPLAY_TIME
,
FROM_SCALE
(
i64
)
);
return
VLC_SUCCESS
;
}
}
}
...
...
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