]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/adjust.c
http access: Use EnsureUTF8() on the ICY strings. Avoids "illegal byte sequence"...
[vlc] / modules / video_filter / adjust.c
index 01c7af788e009dd0507b261caac578e1d4ab0a63..a4bf4ef945ee5a0e0eb96d48490ed130d6f968ba 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <errno.h>
-#include <math.h>
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
 
+#include <errno.h>
+#include <math.h>
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_sout.h>
@@ -155,10 +156,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;
 
     /* needed to get options passed in transcode using the
@@ -217,12 +215,10 @@ static picture_t *FilterPlanar( filter_t *p_filter, picture_t *p_pic )
 
     if( !p_pic ) return NULL;
 
-    p_outpic = p_filter->pf_vout_buffer_new( p_filter );
+    p_outpic = filter_NewPicture( p_filter );
     if( !p_outpic )
     {
-        msg_Warn( p_filter, "can't get output picture" );
-        if( p_pic->pf_release )
-            p_pic->pf_release( p_pic );
+        picture_Release( p_pic );
         return NULL;
     }
 
@@ -449,8 +445,8 @@ static picture_t *FilterPacked( filter_t *p_filter, picture_t *p_pic )
     {
         msg_Warn( p_filter, "Unsupported input chroma (%4s)",
                   (char*)&(p_pic->format.i_chroma) );
-        if( p_pic->pf_release )
-            p_pic->pf_release( p_pic );
+
+        picture_Release( p_pic );
         return NULL;
     }
 
@@ -458,8 +454,8 @@ static picture_t *FilterPacked( filter_t *p_filter, picture_t *p_pic )
     if( !p_outpic )
     {
         msg_Warn( p_filter, "can't get output picture" );
-        if( p_pic->pf_release )
-            p_pic->pf_release( p_pic );
+
+        picture_Release( p_pic );
         return NULL;
     }