]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/mosaic.c
compare the right amount of data, being a little bit more strict
[vlc] / modules / video_filter / mosaic.c
index be38d8e382791d6e0e4b141ccf11cc0f04d132ca..68a77371f4efefe89f8400ec8665f2a62ed8f1ac 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#define _GNU_SOURCE
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>
-#include <math.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <vlc/vlc.h>
 #include <vlc_vout.h>
 
-#ifdef HAVE_LIMITS_H
-#   include <limits.h> /* INT_MAX */
-#endif
+#include <math.h>
+#include <limits.h> /* INT_MAX */
 
 #include "vlc_filter.h"
 #include "vlc_image.h"
@@ -284,7 +282,7 @@ static int CreateFilter( vlc_object_t *p_this )
 {
     filter_t *p_filter = (filter_t *)p_this;
     filter_sys_t *p_sys;
-    vlc_object_t *p_libvlc = p_filter->p_libvlc;
+    vlc_object_t *p_libvlc = VLC_OBJECT( p_filter->p_libvlc );
     char *psz_order;
     char *psz_offsets;
     int i_index;
@@ -692,7 +690,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
         {
             p_region->i_y = p_sys->pi_y_offsets[i_real_index];
         }
-        else if( fmt_out.i_height < row_inner_height
+        else if( fmt_out.i_height > row_inner_height
             || p_sys->b_ar || p_sys->b_keep )
         {
             /* we don't have to center the video since it takes the
@@ -736,6 +734,7 @@ static int MosaicCallback( vlc_object_t *p_this, char const *psz_var,
                             vlc_value_t oldval, vlc_value_t newval,
                             void *p_data )
 {
+    VLC_UNUSED(oldval);
     filter_sys_t *p_sys = (filter_sys_t *) p_data;
 
 #define VAR_IS( a ) !strcmp( psz_var, CFG_PREFIX a )