]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/mosaic.c
Test pointers against NULL instead of 0.
[vlc] / modules / video_filter / mosaic.c
index 661eb77e261cbf7bb3d5068147f40d12d0a79629..4a16f224ac364daf264c6dba0e1e6a124f588a29 100644 (file)
@@ -174,13 +174,13 @@ static const char *const ppsz_align_descriptions[] =
 
 #define CFG_PREFIX "mosaic-"
 
-vlc_module_begin();
-    set_description( N_("Mosaic video sub filter") );
-    set_shortname( N_("Mosaic") );
-    set_category( CAT_VIDEO );
-    set_subcategory( SUBCAT_VIDEO_SUBPIC);
-    set_capability( "sub filter", 0 );
-    set_callbacks( CreateFilter, DestroyFilter );
+vlc_module_begin ()
+    set_description( N_("Mosaic video sub filter") )
+    set_shortname( N_("Mosaic") )
+    set_category( CAT_VIDEO )
+    set_subcategory( SUBCAT_VIDEO_SUBPIC)
+    set_capability( "sub filter", 0 )
+    set_callbacks( CreateFilter, DestroyFilter )
 
     add_integer_with_range( CFG_PREFIX "alpha", 255, 0, 255, NULL,
                             ALPHA_TEXT, ALPHA_LONGTEXT, false );
@@ -201,10 +201,10 @@ vlc_module_begin();
 
     add_integer( CFG_PREFIX "borderw", 0, NULL,
                  BORDERW_TEXT, BORDERW_LONGTEXT, true );
-        add_deprecated_alias( CFG_PREFIX "vborder" );
+        add_deprecated_alias( CFG_PREFIX "vborder" )
     add_integer( CFG_PREFIX "borderh", 0, NULL,
                  BORDERH_TEXT, BORDERH_LONGTEXT, true );
-        add_deprecated_alias( CFG_PREFIX "hborder" );
+        add_deprecated_alias( CFG_PREFIX "hborder" )
 
     add_integer( CFG_PREFIX "position", 0, NULL,
                  POS_TEXT, POS_LONGTEXT, false );
@@ -227,7 +227,7 @@ vlc_module_begin();
 
     add_integer( CFG_PREFIX "delay", 0, NULL, DELAY_TEXT, DELAY_LONGTEXT,
                  false );
-vlc_module_end();
+vlc_module_end ()
 
 static const char *const ppsz_filter_options[] = {
     "alpha", "height", "width", "align", "xoffset", "yoffset",
@@ -495,7 +495,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
             if ( !p_es->b_empty )
             {
                 i_numpics ++;
-                if( p_sys->i_order_length && p_es->psz_id != 0 )
+                if( p_sys->i_order_length && p_es->psz_id != NULL )
                 {
                     /* We also want to leave slots for images given in
                      * mosaic-order that are not available in p_vout_picture */
@@ -641,10 +641,10 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
             fmt_out.i_visible_height = fmt_out.i_height;
         }
 
-        p_region = p_spu->pf_create_region( VLC_OBJECT(p_filter), &fmt_out );
-        /* XXX That's a pity to do a copy, but it is needed for now */
+        p_region = subpicture_region_New( &fmt_out );
+        /* FIXME the copy is probably not needed anymore */
         if( p_region )
-            picture_Copy( &p_region->picture, p_converted );
+            picture_Copy( p_region->p_picture, p_converted );
         if( !p_sys->b_keep )
             picture_Release( p_converted );