[vlc-devel] commit: Cosmetics (netsync). (Laurent Aimar )
git version control
git at videolan.org
Tue Feb 2 21:25:38 CET 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Feb 1 22:09:10 2010 +0100| [30fd105fe8fea10bd15b07730a1206e4f742bba8] | committer: Laurent Aimar
Cosmetics (netsync).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=30fd105fe8fea10bd15b07730a1206e4f742bba8
---
modules/control/netsync.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/modules/control/netsync.c b/modules/control/netsync.c
index ecf9abc..30276f5 100644
--- a/modules/control/netsync.c
+++ b/modules/control/netsync.c
@@ -50,8 +50,8 @@
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-static int Activate( vlc_object_t * );
-static void Close ( vlc_object_t * );
+static int Open ( vlc_object_t * );
+static void Close( vlc_object_t * );
#define NETSYNC_TEXT N_( "Network master clock" )
#define NETSYNC_LONGTEXT N_( "When set then " \
@@ -80,7 +80,7 @@ vlc_module_begin ()
NETSYNC_TIMEOUT_TEXT, NETSYNC_TIMEOUT_LONGTEXT, true )
set_capability( "interface", 0 )
- set_callbacks( Activate, Close )
+ set_callbacks( Open, Close )
vlc_module_end ()
/*****************************************************************************
@@ -91,7 +91,7 @@ static void Run( intf_thread_t *p_intf );
/*****************************************************************************
* Activate: initialize and create stuff
*****************************************************************************/
-static int Activate( vlc_object_t *p_this )
+static int Open( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t*)p_this;
int fd;
@@ -140,12 +140,13 @@ static void Run( intf_thread_t *p_intf )
int canc = vlc_savecancel();
input_thread_t *p_input = NULL;
char p_data[MAX_MSG_LENGTH];
- int i_socket;
+ int i_socket = (intptr_t)p_intf->p_sys;
playlist_t *p_playlist = pl_Hold( p_intf );
- int i_timeout = __MIN( 500, var_InheritInteger( p_intf, "netsync-timeout" ) );
+ int i_timeout = var_InheritInteger( p_intf, "netsync-timeout" );
+ if( i_timeout < 500 )
+ i_timeout = 500;
bool b_master = var_InheritBool( p_intf, "netsync-master" );
- i_socket = (intptr_t)p_intf->p_sys;
/* High priority thread */
vlc_thread_set_priority( p_intf, VLC_THREAD_PRIORITY_INPUT );
More information about the vlc-devel
mailing list