[vlc-commits] vout: switch spu-elapsed variable to integer time

Rémi Denis-Courmont git at videolan.org
Fri May 22 21:15:55 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri May 22 22:05:11 2015 +0300| [b1763920f7aa2ecf07036df0b89df00761933cd0] | committer: Rémi Denis-Courmont

vout: switch spu-elapsed variable to integer time

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

 modules/text_renderer/text_layout.c |    2 +-
 src/video_output/vout_subpictures.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/text_renderer/text_layout.c b/modules/text_renderer/text_layout.c
index 84e1807..bb6019b 100644
--- a/modules/text_renderer/text_layout.c
+++ b/modules/text_renderer/text_layout.c
@@ -248,7 +248,7 @@ static paragraph_t *NewParagraph( filter_t *p_filter,
                 i_size * sizeof( *pp_styles ) );
     if( pi_k_dates )
     {
-        int64_t i_elapsed  = var_GetTime( p_filter, "spu-elapsed" ) / 1000;
+        int64_t i_elapsed  = var_GetInteger( p_filter, "spu-elapsed" ) / 1000;
         for( int i = 0; i < i_size; ++i )
         {
             p_paragraph->pi_karaoke_bar[ i ] = pi_k_dates[ i ] >= i_elapsed;
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 5ed60c3..44303a1 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -205,7 +205,7 @@ static filter_t *SpuRenderCreateAndLoadText(spu_t *spu)
     text->p_module = module_need(text, "text renderer", "$text-renderer", false);
 
     /* Create a few variables used for enhanced text rendering */
-    var_Create(text, "spu-elapsed",   VLC_VAR_TIME);
+    var_Create(text, "spu-elapsed",   VLC_VAR_INTEGER);
     var_Create(text, "text-rerender", VLC_VAR_BOOL);
 
     return text;
@@ -272,7 +272,7 @@ static void SpuRenderText(spu_t *spu, bool *rerender_text,
      * least show up on screen, but the effect won't change
      * the text over time.
      */
-    var_SetTime(text, "spu-elapsed", elapsed_time);
+    var_SetInteger(text, "spu-elapsed", elapsed_time);
     var_SetBool(text, "text-rerender", false);
 
     if (text->pf_render_html && region->psz_html)



More information about the vlc-commits mailing list