]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/bluescreen.c
Use var_InheritString for --decklink-video-connection.
[vlc] / modules / video_filter / bluescreen.c
index d889b540c9a8a30b1de51ef0f439bdf1febc7487..378219168dc021cd2f2df4da2998fe332f0e7e74 100644 (file)
 # include "config.h"
 #endif
 
-#include <assert.h>
-
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_filter.h>
-#include <vlc_memory.h>
 
 #define BLUESCREEN_HELP N_( \
     "This effect, also known as \"greenscreen\" or \"chroma key\" blends " \
@@ -117,7 +114,7 @@ static int Create( vlc_object_t *p_this )
     if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_YUVA )
     {
         msg_Err( p_filter,
-                 "Unsupported input chroma \"%4s\". "
+                 "Unsupported input chroma \"%4.4s\". "
                  "Bluescreen can only use \"YUVA\".",
                  (char*)&p_filter->fmt_in.video.i_chroma );
         return VLC_EGENERIC;
@@ -182,15 +179,14 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     if( p_pic->format.i_chroma != VLC_CODEC_YUVA )
     {
         msg_Err( p_filter,
-                 "Unsupported input chroma \"%4s\". "
+                 "Unsupported input chroma \"%4.4s\". "
                  "Bluescreen can only use \"YUVA\".",
                  (char*)&p_pic->format.i_chroma );
         return NULL;
     }
 
-    p_sys->p_at = realloc_or_free( p_sys->p_at,
-                                   i_lines * i_pitch * sizeof( uint8_t ) );
-    assert( p_sys->p_at );
+    p_sys->p_at = xrealloc( p_sys->p_at,
+                            i_lines * i_pitch * sizeof( uint8_t ) );
     p_at = p_sys->p_at;
 
     vlc_mutex_lock( &p_sys->lock );