]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/dynamicoverlay/dynamicoverlay.c
Don't print a message a malloc failed.
[vlc] / modules / video_filter / dynamicoverlay / dynamicoverlay.c
index e44302f5704d6be67fb33461aa6b81725fb005fb..02e9a56cd3dbc7a9b5691a81260185462c5b0a8f 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (C) 2007 the VideoLAN team
  * $Id$
  *
- * Author: Søren Bøg <avacore@videolan.org>
+ * Author: Soren Bog <avacore@videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -28,7 +28,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_sout.h>
 #include <vlc_vout.h>
 #include <vlc_filter.h>
@@ -61,8 +62,8 @@ static int AdjustCallback( vlc_object_t *p_this, char const *psz_var,
 #define OUTPUT_LONGTEXT N_("FIFO which will be written to for responses")
 
 vlc_module_begin();
-    set_description( _("Dynamic video overlay") );
-    set_shortname( _("Overlay" ));
+    set_description( N_("Dynamic video overlay") );
+    set_shortname( N_("Overlay" ));
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
     set_capability( "sub filter", 0 );
@@ -76,7 +77,7 @@ vlc_module_begin();
     set_callbacks( Create, Destroy );
 vlc_module_end();
 
-static const char *ppsz_filter_options[] = {
+static const char *const ppsz_filter_options[] = {
     "input", "output", NULL
 };
 
@@ -93,10 +94,7 @@ static int Create( vlc_object_t *p_this )
     /* Allocate structure */
     p_filter->p_sys = malloc( sizeof( filter_sys_t ) );
     if( p_filter->p_sys == NULL )
-    {
-        msg_Err( p_filter, "out of memory" );
         return VLC_ENOMEM;
-    }
     p_sys = p_filter->p_sys;
 
     BufferInit( &p_sys->input );
@@ -368,9 +366,8 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
                 *pp_region = NULL;
                 break;
             }
-            p_filter->p_libvlc->pf_memcpy( (*pp_region)->p_style,
-                                            &p_overlay->fontstyle,
-                                            sizeof(struct text_style_t) );
+            vlc_memcpy( (*pp_region)->p_style, &p_overlay->fontstyle,
+                        sizeof(struct text_style_t) );
         }
         else
         {