[vlc-commits] spu:mosaic: read the delay directly in vlc_tick_t

Steve Lhomme git at videolan.org
Tue Sep 18 16:42:46 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Sep 18 16:18:07 2018 +0200| [0f5add8e0088419d7fa456ec215f054abec2cf72] | committer: Steve Lhomme

spu:mosaic: read the delay directly in vlc_tick_t

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f5add8e0088419d7fa456ec215f054abec2cf72
---

 modules/spu/mosaic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/spu/mosaic.c b/modules/spu/mosaic.c
index e08ae7794f..455b56852e 100644
--- a/modules/spu/mosaic.c
+++ b/modules/spu/mosaic.c
@@ -317,9 +317,10 @@ static int CreateFilter( vlc_object_t *p_this )
     GET_VAR( cols, 1, INT_MAX );
     GET_VAR( alpha, 0, 255 );
     GET_VAR( position, 0, 2 );
-    GET_VAR( delay, 100, INT_MAX );
 #undef GET_VAR
-    p_sys->i_delay *= 1000;
+    i_command = var_CreateGetIntegerCommand( p_filter, CFG_PREFIX "delay" );
+    p_sys->i_delay = VLC_TICK_FROM_MS(VLC_CLIP( i_command, 0, INT_MAX ));
+    var_AddCallback( p_filter, CFG_PREFIX "delay", MosaicCallback, p_sys );
 
     p_sys->b_ar = var_CreateGetBoolCommand( p_filter,
                                             CFG_PREFIX "keep-aspect-ratio" );



More information about the vlc-commits mailing list