[vlc-devel] commit: core: create two variables at initialization ( for var_AddCallback to get a higher chance to succeed!) (Erwan Tulou )

git version control git at videolan.org
Fri Sep 18 21:14:05 CEST 2009


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Thu Sep 10 21:57:22 2009 +0200| [873649193e6800a3e125ea1bfa8db41e73af9692] | committer: Erwan Tulou 

core: create two variables at initialization (for var_AddCallback to get a higher chance to succeed!)

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

 src/input/input.c |    3 ---
 src/input/var.c   |    3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 46236df..02be366 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1144,9 +1144,6 @@ static int Init( input_thread_t * p_input )
     es_out_Control( p_input->p->p_es_out, ES_OUT_SET_ACTIVE, false );
     es_out_Control( p_input->p->p_es_out, ES_OUT_SET_MODE, ES_OUT_MODE_NONE );
 
-    var_Create( p_input, "bit-rate", VLC_VAR_INTEGER );
-    var_Create( p_input, "sample-rate", VLC_VAR_INTEGER );
-
     /* */
     input_ChangeState( p_input, OPENING_S );
     input_SendEventCache( p_input, 0.0 );
diff --git a/src/input/var.c b/src/input/var.c
index 21d7c37..1f3ed16 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -223,6 +223,9 @@ void input_ControlVarInit ( input_thread_t *p_input )
     val.i_time = 0;
     var_Change( p_input, "length", VLC_VAR_SETVALUE, &val, NULL );
 
+    var_Create( p_input, "bit-rate", VLC_VAR_INTEGER );
+    var_Create( p_input, "sample-rate", VLC_VAR_INTEGER );
+
     if( !p_input->b_preparsing )
     {
         /* Special "intf-event" variable. */




More information about the vlc-devel mailing list