Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
8d263243
Commit
8d263243
authored
Mar 18, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use %f in VLM, except for display (Closes:#588)
parent
019ee285
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
src/misc/vlm.c
src/misc/vlm.c
+10
-6
No files found.
src/misc/vlm.c
View file @
8d263243
...
...
@@ -1234,11 +1234,15 @@ int vlm_MediaControl( vlm_t *vlm, vlm_media_t *media, const char *psz_id,
vlc_value_t
val
;
float
f_percentage
;
if
(
psz_args
&&
sscanf
(
psz_args
,
"%f"
,
&
f_percentage
)
==
1
)
if
(
psz_args
)
{
val
.
f_float
=
f_percentage
/
100
.
0
;
var_Set
(
p_instance
->
p_input
,
"position"
,
val
);
return
VLC_SUCCESS
;
f_percentage
=
i18n_atof
(
psz_args
);
if
(
f_percentage
>=
0
.
0
&&
f_percentage
<=
100
.
0
)
{
val
.
f_float
=
f_percentage
/
100
.
0
;
var_Set
(
p_instance
->
p_input
,
"position"
,
val
);
return
VLC_SUCCESS
;
}
}
}
else
if
(
!
strcmp
(
psz_command
,
"stop"
)
)
...
...
@@ -2312,8 +2316,8 @@ int vlm_MediaVodControl( void *p_private, vod_media_t *p_vod_media,
{
double
f_pos
=
(
double
)
va_arg
(
args
,
double
);
char
psz_pos
[
50
];
sprintf
(
psz_pos
,
"%f"
,
f_pos
);
lldiv_t
div
=
lldiv
(
f_pos
*
10000000
,
10000000
);
sprintf
(
psz_pos
,
I64Fd
".%07u"
,
div
.
quot
,
(
unsigned
int
)
div
.
rem
);
i_ret
=
vlm_MediaControl
(
vlm
,
vlm
->
media
[
i
],
psz_id
,
"seek"
,
psz_pos
);
break
;
}
...
...
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