[vlc-commits] input: use type-checked variable setters
Rémi Denis-Courmont
git at videolan.org
Fri May 22 21:15:53 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri May 22 21:01:06 2015 +0300| [a30f9045c4b0ff18cd41f82ffc0c3de9c9f4d0aa] | committer: Rémi Denis-Courmont
input: use type-checked variable setters
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a30f9045c4b0ff18cd41f82ffc0c3de9c9f4d0aa
---
src/input/var.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/input/var.c b/src/input/var.c
index 3207db3..c478609 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -185,8 +185,8 @@ void input_ControlVarInit ( input_thread_t *p_input )
/* Delay */
var_Create( p_input, "audio-delay", VLC_VAR_TIME );
- val.i_time = INT64_C(1000) * var_GetInteger( p_input, "audio-desync" );
- var_Change( p_input, "audio-delay", VLC_VAR_SETVALUE, &val, NULL );
+ var_SetTime( p_input, "audio-delay",
+ 1000 * var_GetInteger( p_input, "audio-desync" ) );
var_Create( p_input, "spu-delay", VLC_VAR_TIME );
/* Video ES */
@@ -205,8 +205,7 @@ void input_ControlVarInit ( input_thread_t *p_input )
var_Change( p_input, "spu-es", VLC_VAR_SETTEXT, &text, NULL );
var_Create( p_input, "spu-choice", VLC_VAR_INTEGER );
- val.i_int = -1;
- var_Change( p_input, "spu-choice", VLC_VAR_SETVALUE, &val, NULL );
+ var_SetInteger( p_input, "spu-choice", -1 );
/* Special read only objects variables for intf */
var_Create( p_input, "bookmarks", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
More information about the vlc-commits
mailing list