X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fwall.c;h=c5833bc67f85a39aae0ff29a7c24d48440f40a5a;hb=46f77d8add706d1d5a7f064039f63ffd219aa826;hp=110cc54075595da7083ecdfb8d926c8e496a80de;hpb=27d483e9ef7a451397d7857251c8d67097661f1d;p=vlc diff --git a/modules/video_filter/wall.c b/modules/video_filter/wall.c index 110cc54075..c5833bc67f 100644 --- a/modules/video_filter/wall.c +++ b/modules/video_filter/wall.c @@ -29,7 +29,7 @@ # include "config.h" #endif -#include +#include #include #include @@ -72,8 +72,8 @@ static int SendEvents( vlc_object_t *, char const *, #define CFG_PREFIX "wall-" vlc_module_begin(); - set_description( _("Wall video filter") ); - set_shortname( _("Image wall" )); + set_description( N_("Wall video filter") ); + set_shortname( N_("Image wall" )); set_capability( "video filter", 0 ); set_category( CAT_VIDEO ); set_subcategory( SUBCAT_VIDEO_VFILTER ); @@ -88,7 +88,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "cols", "rows", "active", "element-aspect", NULL }; @@ -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 ); } }