]> git.sesse.net Git - vlc/blobdiff - modules/access/rtsp/access.c
s/OpenTCP/ConnectTCP/ for consistency
[vlc] / modules / access / rtsp / access.c
index 7ae26f0d9e698d634013754e049d96fc9f416d8e..00f32593a274f81b156adf7003c73df5eb35bf33 100644 (file)
@@ -2,7 +2,7 @@
  * access.c: Real rtsp input
  *****************************************************************************
  * Copyright (C) 2005 VideoLAN
- * $Id: file.c 10310 2005-03-11 22:36:40Z anil $
+ * $Id$
  *
  * Authors: Gildas Bazin <gbazin@videolan.org>
  *
@@ -43,7 +43,7 @@ static void Close( vlc_object_t * );
     "value should be set in millisecond units." )
 
 vlc_module_begin();
-    set_description( _("Standard filesystem file input") );
+    set_description( _("Real RTSP") );
     set_shortname( _("Real RTSP") );
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_ACCESS );
@@ -84,7 +84,7 @@ static int RtspConnect( void *p_userdata, char *psz_server, int i_port )
     access_sys_t *p_sys = p_access->p_sys;
 
     /* Open connection */
-    p_sys->fd = net_OpenTCP( p_access, psz_server, i_port );
+    p_sys->fd = net_ConnectTCP( p_access, psz_server, i_port );
     if( p_sys->fd < 0 )
     {
         msg_Err( p_access, "cannot connect to %s:%d", psz_server, i_port );
@@ -220,6 +220,7 @@ static int Open( vlc_object_t *p_this )
         p_sys->p_header = block_New( p_access, 4096 );
         p_sys->p_header->i_buffer =
             rmff_dump_header( h, p_sys->p_header->p_buffer, 1024 );
+        rmff_free_header( h );
     }
     else
     {
@@ -231,6 +232,7 @@ static int Open( vlc_object_t *p_this )
     var_Create( p_access, "realrtsp-caching",
                 VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
 
+    if( psz_server ) free( psz_server );
     return VLC_SUCCESS;
 
  error:
@@ -292,7 +294,6 @@ static int Seek( access_t *p_access, int64_t i_pos )
  *****************************************************************************/
 static int Control( access_t *p_access, int i_query, va_list args )
 {
-    access_sys_t *p_sys = p_access->p_sys;
     vlc_bool_t   *pb_bool;
     int          *pi_int;
     int64_t      *pi_64;