]> git.sesse.net Git - vlc/blobdiff - modules/mux/asf.c
Remove useless check for time.h
[vlc] / modules / mux / asf.c
index f2c3c8c8615dbf6ad3cf5bbdce660c923d974d01..7ae86d4c10877ab75b39158a6c95731901c946bc 100644 (file)
@@ -65,33 +65,33 @@ static void Close  ( vlc_object_t * );
 #define BITRATE_LONGTEXT N_("Do not try to guess ASF bitrate. Setting this, allows you to control how Windows Media Player will cache streamed content. Set to audio+video bitrate in bytes")
 
 
-vlc_module_begin();
-    set_description( N_("ASF muxer") );
-    set_category( CAT_SOUT );
-    set_subcategory( SUBCAT_SOUT_MUX );
-    set_shortname( "ASF" );
+vlc_module_begin ()
+    set_description( N_("ASF muxer") )
+    set_category( CAT_SOUT )
+    set_subcategory( SUBCAT_SOUT_MUX )
+    set_shortname( "ASF" )
 
-    set_capability( "sout mux", 5 );
-    add_shortcut( "asf" );
-    add_shortcut( "asfh" );
-    set_callbacks( Open, Close );
+    set_capability( "sout mux", 5 )
+    add_shortcut( "asf" )
+    add_shortcut( "asfh" )
+    set_callbacks( Open, Close )
 
     add_string( SOUT_CFG_PREFIX "title", "", NULL, TITLE_TEXT, TITLE_LONGTEXT,
-                                 true );
+                                 true )
     add_string( SOUT_CFG_PREFIX "author",   "", NULL, AUTHOR_TEXT,
-                                 AUTHOR_LONGTEXT, true );
+                                 AUTHOR_LONGTEXT, true )
     add_string( SOUT_CFG_PREFIX "copyright","", NULL, COPYRIGHT_TEXT,
-                                 COPYRIGHT_LONGTEXT, true );
+                                 COPYRIGHT_LONGTEXT, true )
     add_string( SOUT_CFG_PREFIX "comment",  "", NULL, COMMENT_TEXT,
-                                 COMMENT_LONGTEXT, true );
+                                 COMMENT_LONGTEXT, true )
     add_string( SOUT_CFG_PREFIX "rating",  "", NULL, RATING_TEXT,
-                                 RATING_LONGTEXT, true );
+                                 RATING_LONGTEXT, true )
     add_integer( SOUT_CFG_PREFIX "packet-size", 4096, NULL, PACKETSIZE_TEXT,
-                                 PACKETSIZE_LONGTEXT, true );
+                                 PACKETSIZE_LONGTEXT, true )
     add_integer( SOUT_CFG_PREFIX "bitrate-override", 0, NULL, BITRATE_TEXT,
-                                 BITRATE_LONGTEXT, true );
+                                 BITRATE_LONGTEXT, true )
 
-vlc_module_end();
+vlc_module_end ()
 
 /*****************************************************************************
  * Locales prototypes
@@ -201,6 +201,8 @@ static int Open( vlc_object_t *p_this )
     p_mux->pf_mux       = Mux;
 
     p_mux->p_sys = p_sys = malloc( sizeof( sout_mux_sys_t ) );
+    if( !p_sys )
+        return VLC_ENOMEM;
     p_sys->b_asf_http = p_mux->psz_mux && !strcmp( p_mux->psz_mux, "asfh" );
     if( p_sys->b_asf_http )
     {
@@ -449,6 +451,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
             tk->i_extra = sizeof( WAVEFORMATEX ) +
                           p_input->p_fmt->i_extra + i_extra;
             tk->p_extra = malloc( tk->i_extra );
+            if( !tk->p_extra )
+                return VLC_ENOMEM;
             bo_init( &bo, tk->p_extra, tk->i_extra );
             bo_addle_u16( &bo, tk->i_tag );
             bo_addle_u16( &bo, p_input->p_fmt->audio.i_channels );
@@ -506,6 +510,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
             tk->i_extra = 11 + sizeof( BITMAPINFOHEADER ) +
                           p_input->p_fmt->i_extra;
             tk->p_extra = malloc( tk->i_extra );
+            if( !tk->p_extra )
+                return VLC_ENOMEM;
             bo_init( &bo, tk->p_extra, tk->i_extra );
             bo_addle_u32( &bo, p_input->p_fmt->video.i_width );
             bo_addle_u32( &bo, p_input->p_fmt->video.i_height );