]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/wall.c
Fix non utf-8 encoding.
[vlc] / modules / video_filter / wall.c
index 09f3cda7a4199458e6bb28437eddbb71f42bc0c0..c5833bc67f85a39aae0ff29a7c24d48440f40a5a 100644 (file)
@@ -29,7 +29,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_vout.h>
 
@@ -147,10 +147,7 @@ static int Create( vlc_object_t *p_this )
     /* Allocate structure */
     p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
     if( p_vout->p_sys == NULL )
-    {
-        msg_Err( p_vout, "out of memory" );
         return VLC_ENOMEM;
-    }
 
     p_vout->pf_init = Init;
     p_vout->pf_end = End;
@@ -177,7 +174,6 @@ static int Create( vlc_object_t *p_this )
                                      sizeof(struct vout_list_t) );
     if( p_vout->p_sys->pp_vout == NULL )
     {
-        msg_Err( p_vout, "out of memory" );
         free( p_vout->p_sys );
         return VLC_ENOMEM;
     }
@@ -299,12 +295,12 @@ static int Init( vout_thread_t *p_vout )
     w1 &= ~1;
     h1 = w1 * VOUT_ASPECT_FACTOR / i_aspect&~1;
     h1 &= ~1;
+
     h2 = p_vout->output.i_height / p_vout->p_sys->i_row&~1;
     h2 &= ~1;
     w2 = h2 * i_aspect / VOUT_ASPECT_FACTOR&~1;
     w2 &= ~1;
+
     if ( h1 * p_vout->p_sys->i_row < p_vout->output.i_height )
     {
         unsigned int i_tmp;
@@ -340,7 +336,7 @@ static int Init( vout_thread_t *p_vout )
 
     p_vout->p_sys->i_vout = 0;
     msg_Dbg( p_vout, "target window (%d,%d)-(%d,%d)", i_hstart,i_vstart,i_hend,i_vend );
+
 
     i_top = 0;
     i_height = 0;
@@ -375,7 +371,7 @@ static int Init( vout_thread_t *p_vout )
                     i_align |= VOUT_ALIGN_RIGHT;
                 }
             }
+
             if( i_row * i_target_height >= i_vstart &&
                 ( i_row + 1 ) * i_target_height <= i_vend )
             {
@@ -516,7 +512,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
                                     0, 0, 0 )
                    ) == NULL )
             {
-                if( p_vout->b_die || p_vout->b_error )
+                if( !vlc_object_alive (p_vout) || p_vout->b_error )
                 {
                     vout_DestroyPicture(
                         p_vout->p_sys->pp_vout[ i_vout ].p_vout, p_outpic );
@@ -589,7 +585,7 @@ static void RemoveAllVout( vout_thread_t *p_vout )
                  SendEvents );
              vlc_object_detach(
                  p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout );
-             vout_Destroy(
+             vlc_object_release(
                  p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout );
          }
     }