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
9ad7f61f
Commit
9ad7f61f
authored
Apr 05, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ps: fix division by zero when seeking (fixes #2633)
That happened when seeking during the first second of playback.
parent
79de2215
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
modules/demux/ps.c
modules/demux/ps.c
+5
-2
No files found.
modules/demux/ps.c
View file @
9ad7f61f
...
@@ -491,9 +491,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -491,9 +491,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{
{
int64_t
i_now
=
p_sys
->
i_current_pts
-
p_sys
->
tk
[
p_sys
->
i_time_track
].
i_first_pts
;
int64_t
i_now
=
p_sys
->
i_current_pts
-
p_sys
->
tk
[
p_sys
->
i_time_track
].
i_first_pts
;
int64_t
i_pos
=
stream_Tell
(
p_demux
->
s
);
int64_t
i_pos
=
stream_Tell
(
p_demux
->
s
);
int64_t
i_offset
=
i_pos
/
(
i_now
/
1000000
)
*
((
i64
-
i_now
)
/
1000000
);
stream_Seek
(
p_demux
->
s
,
i_pos
+
i_offset
);
if
(
!
i_now
)
return
i64
?
VLC_EGENERIC
:
VLC_SUCCESS
;
i_pos
*=
(
float
)
i64
/
(
float
)
i_now
;
stream_Seek
(
p_demux
->
s
,
i_pos
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
...
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