]> git.sesse.net Git - vlc/blobdiff - modules/codec/cc.c
Don't clutter REGISTRY on windows...
[vlc] / modules / codec / cc.c
index 5709b2f7d360e2faefb8e8c8f1a4413b4cd8d79b..5b09488a5aec16a8a211f42e67ac38868b371709 100644 (file)
@@ -37,7 +37,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_vout.h>
 #include <vlc_codec.h>
 #include <vlc_input.h>
@@ -51,6 +52,8 @@
 #include <errno.h>
 #include <string.h>
 
+#include <assert.h>
+
 /*****************************************************************************
  * Module descriptor.
  *****************************************************************************/
@@ -58,8 +61,8 @@ static int  Open ( vlc_object_t * );
 static void Close( vlc_object_t * );
 
 vlc_module_begin();
-    set_shortname( _("CC 608/708"));
-    set_description( _("Closed Captions decoder") );
+    set_shortname( N_("CC 608/708"));
+    set_description( N_("Closed Captions decoder") );
     set_capability( "decoder", 50 );
     set_callbacks( Open, Close );
 vlc_module_end();
@@ -198,10 +201,7 @@ static int Open( vlc_object_t *p_this )
     /* Allocate the memory needed to store the decoder's structure */
     p_dec->p_sys = p_sys = malloc( sizeof( *p_sys ) );
     if( p_sys == NULL )
-    {
-        msg_Err( p_dec, "out of memory" );
         return VLC_ENOMEM;
-    }
 
     /* init of p_sys */
     memset( p_sys, 0, sizeof( *p_sys ) );
@@ -1109,6 +1109,8 @@ static char *Eia608Text( eia608_t *h, bool b_html )
 
     /* We allocate a buffer big enough for normal case */
     psz = malloc( i_size );
+    if( !psz )
+        return NULL;
     *psz = '\0';
     if( b_html )
         Eia608Strlcat( psz, "<text>", i_size );