]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/rotate.c
macosx: Ask to send a mail to our bugreport ML if a crash log is detected.
[vlc] / modules / video_filter / rotate.c
index 7e87b40afc047729b4f79be3b574f80d0f7f746d..55b7c9fbb88f805cd1d85427e0996dfa742f2b07 100644 (file)
  * Preamble
  *****************************************************************************/
 
-#include <math.h>                                            /* sin(), cos() */
-
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
 
+#include <math.h>                                            /* sin(), cos() */
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_vout.h>
@@ -131,10 +131,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;
 
     config_ChainParse( p_filter, FILTER_PREFIX, ppsz_filter_options,
@@ -175,12 +172,10 @@ static picture_t *Filter( 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;
     }
 
@@ -304,17 +299,14 @@ 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;
     }
 
-    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;
     }