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
e5266153
Commit
e5266153
authored
Aug 13, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: avoid implicit upconversion to double
parent
0b2b33f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
src/input/input.c
src/input/input.c
+8
-9
No files found.
src/input/input.c
View file @
e5266153
...
...
@@ -1650,27 +1650,26 @@ static bool Control( input_thread_t *p_input,
case
INPUT_CONTROL_SET_POSITION
:
{
double
f_pos
;
if
(
p_input
->
p
->
b_recording
)
{
msg_Err
(
p_input
,
"INPUT_CONTROL_SET_POSITION(_OFFSET) ignored while recording"
);
break
;
}
f_pos
=
val
.
f_float
;
float
f_pos
=
val
.
f_float
;
if
(
i_type
!=
INPUT_CONTROL_SET_POSITION
)
f_pos
+=
var_GetFloat
(
p_input
,
"position"
);
if
(
f_pos
<
0
.
0
)
f_pos
=
0
.
0
;
else
if
(
f_pos
>
1
.
0
)
f_pos
=
1
.
0
;
if
(
f_pos
<
0
.
f
)
f_pos
=
0
.
f
;
else
if
(
f_pos
>
1
.
f
)
f_pos
=
1
.
f
;
/* Reset the decoders states and clock sync (before calling the demuxer */
es_out_SetTime
(
p_input
->
p
->
p_es_out
,
-
1
);
if
(
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_SET_POSITION
,
f_pos
,
!
p_input
->
p
->
b_fast_seek
)
)
(
double
)
f_pos
,
!
p_input
->
p
->
b_fast_seek
)
)
{
msg_Err
(
p_input
,
"INPUT_CONTROL_SET_POSITION(_OFFSET) "
"%2.1f%% failed"
,
f_pos
*
100
);
"%2.1f%% failed"
,
(
double
)(
f_pos
*
100
.
f
)
);
}
else
{
...
...
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