[vlc-devel] commit: Use var_CreateGet when needed (and cleaning) ( Rémi Duraffort )
git version control
git at videolan.org
Sun Nov 2 12:41:59 CET 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Nov 2 12:39:34 2008 +0100| [30b6a950676d59cf110a5ecdfa7798b2311274bf] | committer: Rémi Duraffort
Use var_CreateGet when needed (and cleaning)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=30b6a950676d59cf110a5ecdfa7798b2311274bf
---
modules/access/eyetv.m | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/modules/access/eyetv.m b/modules/access/eyetv.m
index dad8c05..f9d88f7 100644
--- a/modules/access/eyetv.m
+++ b/modules/access/eyetv.m
@@ -160,23 +160,21 @@ static int Open( vlc_object_t *p_this )
struct sockaddr_un publicAddr, peerAddr;
int publicSock;
- vlc_value_t val;
-
/* Init p_access */
- access_InitFields( p_access ); \
- ACCESS_SET_CALLBACKS( NULL, BlockRead, Control, NULL ); \
- MALLOC_ERR( p_access->p_sys, access_sys_t ); \
+ access_InitFields( p_access );
+ ACCESS_SET_CALLBACKS( NULL, BlockRead, Control, NULL );
p_access->info.b_prebuffered = false;
+ p_sys = p_access->p_sys = calloc( 1, sizeof( access_sys_t ) );
+ if( !p_sys )
+ return VLC_ENOMEM;
- p_sys = p_access->p_sys; memset( p_sys, 0, sizeof( access_sys_t ) );
p_sys->i_pts_delay = var_CreateGetInteger( p_access, "eyetv-caching" );
- var_Create( p_access, "eyetv-channel", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
- var_Get( p_access, "eyetv-channel", &val);
+ int val = var_CreateGetInteger( p_access, "eyetv-channel" );
msg_Dbg( p_access, "coming up" );
- selectChannel(p_this, val.i_int);
+ selectChannel( p_this, val );
/* socket */
memset(&publicAddr, 0, sizeof(publicAddr));
More information about the vlc-devel
mailing list