]> git.sesse.net Git - vlc/blobdiff - modules/access/rtmp/access.c
Trailing ;
[vlc] / modules / access / rtmp / access.c
index 0ada7a49c72c3c55b2a378a0c0e5653ce6db0f50..57e9238dd95b0e2f8b5df44e0b5a363f4f14da35 100644 (file)
 static int  Open ( vlc_object_t * );
 static void Close( vlc_object_t * );
 
-vlc_module_begin();
-    set_description( N_("RTMP input") );
-    set_shortname( N_("RTMP") );
-    set_category( CAT_INPUT );
-    set_subcategory( SUBCAT_INPUT_ACCESS );
+vlc_module_begin ()
+    set_description( N_("RTMP input") )
+    set_shortname( N_("RTMP") )
+    set_category( CAT_INPUT )
+    set_subcategory( SUBCAT_INPUT_ACCESS )
 
     add_integer( "rtmp-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
-                 CACHING_LONGTEXT, true );
+                 CACHING_LONGTEXT, true )
 
-    set_capability( "access", 0 );
-    set_callbacks( Open, Close );
-    add_shortcut( "rtmp" );
-vlc_module_end();
+    set_capability( "access", 0 )
+    set_callbacks( Open, Close )
+    add_shortcut( "rtmp" )
+vlc_module_end ()
 
 
 /*****************************************************************************
@@ -115,7 +115,10 @@ static int Open( vlc_object_t *p_this )
     }
 
     length_path = strlen( p_sys->p_thread->url.psz_path );
-    length_media_name = strlen( strrchr( p_sys->p_thread->url.psz_path, '/' ) ) - 1;
+    char* psz_tmp = strrchr( p_sys->p_thread->url.psz_path, '/' );
+    if( !psz_tmp )
+        goto error;
+    length_media_name = strlen( psz_tmp ) - 1;
 
     p_sys->p_thread->psz_application = strndup( p_sys->p_thread->url.psz_path + 1, length_path - length_media_name - 2 );
     p_sys->p_thread->psz_media = strdup( p_sys->p_thread->url.psz_path + ( length_path - length_media_name ) );
@@ -209,7 +212,7 @@ static int Open( vlc_object_t *p_this )
     }
 
     if( vlc_thread_create( p_sys->p_thread, "rtmp control thread", ThreadControl,
-                           VLC_THREAD_PRIORITY_INPUT, false ) )
+                           VLC_THREAD_PRIORITY_INPUT ) )
     {
         msg_Err( p_access, "cannot spawn rtmp control thread" );
         goto error2;
@@ -445,7 +448,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 )
 {
     bool    *pb_bool;
-    int     *pi_int;
     int64_t *pi_64;
 
     switch( i_query )
@@ -468,11 +470,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
             break;
 
         /* */
-        case ACCESS_GET_MTU:
-            pi_int = (int*) va_arg( args, int * );
-            *pi_int = 0;
-            break;
-
         case ACCESS_GET_PTS_DELAY:
             pi_64 = (int64_t*) va_arg( args, int64_t * );
             *pi_64 = var_GetInteger( p_access, "rtmp-caching" ) * INT64_C(1000);