]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/crop.c
Revert "Fixed open network panel."
[vlc] / modules / video_filter / crop.c
index 4dd65285b15ad2b7d282bc497fb50ab40f052d29..e477c5c337d49d2a65591012b43427050a7c519a 100644 (file)
@@ -31,7 +31,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_vout.h>
 #include <vlc_interface.h>
 
@@ -100,8 +101,8 @@ static int FilterCallback ( vlc_object_t *, char const *,
 #endif
 
 vlc_module_begin();
-    set_description( _("Crop video filter") );
-    set_shortname( _("Crop" ));
+    set_description( N_("Crop video filter") );
+    set_shortname( N_("Crop" ));
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
     set_capability( "video filter", 0 );
@@ -182,10 +183,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;
@@ -423,7 +421,7 @@ static void Destroy( vlc_object_t *p_this )
     {
         DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
         vlc_object_detach( p_vout->p_sys->p_vout );
-        vout_Destroy( p_vout->p_sys->p_vout );
+        vlc_object_release( p_vout->p_sys->p_vout );
     }
 
     DEL_PARENT_CALLBACKS( SendEventsToChild );
@@ -457,7 +455,7 @@ static int Manage( vout_thread_t *p_vout )
     msg_Info( p_vout, "ratio %d",  p_vout->p_sys->i_aspect / 432);
 #endif
 
-    vout_Destroy( p_vout->p_sys->p_vout );
+    vlc_object_release( p_vout->p_sys->p_vout );
 
     fmt.i_width = fmt.i_visible_width = p_vout->p_sys->i_width;
     fmt.i_height = fmt.i_visible_height = p_vout->p_sys->i_height;
@@ -503,7 +501,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
                  vout_CreatePicture( p_vout->p_sys->p_vout, 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->p_vout, p_outpic );
             return;
@@ -534,7 +532,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
 
         while( p_out < p_out_end )
         {
-            p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_copy_pitch );
+            vlc_memcpy( p_out, p_in, i_copy_pitch );
             p_in += i_in_pitch;
             p_out += i_out_pitch;
         }