]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/mosaic.c
scene: use vlc_rename(), fixes use on non-UTF8 systems
[vlc] / modules / video_filter / mosaic.c
index ea47c41eec8b686fa82e4f138f021ea9dc4eaddd..41b3a645f4f22749a8f4a2b286b080a2d438818a 100644 (file)
 
 #include <math.h>
 #include <limits.h> /* INT_MAX */
-#include <assert.h>
 
 #include <vlc_filter.h>
 #include <vlc_image.h>
 
-#include <vlc_memory.h>
-
 #include "mosaic.h"
 
 #define BLANK_DELAY INT64_C(1000000)
@@ -257,16 +254,14 @@ static void __mosaic_ParseSetOffsets( vlc_object_t *p_this,
         {
             i_index++;
 
-            p_sys->pi_x_offsets = realloc_or_free( p_sys->pi_x_offsets,
+            p_sys->pi_x_offsets = xrealloc( p_sys->pi_x_offsets,
                                                    i_index * sizeof(int) );
-            assert( p_sys->pi_x_offsets );
             p_sys->pi_x_offsets[i_index - 1] = atoi( psz_offsets );
             psz_end = strchr( psz_offsets, ',' );
             psz_offsets = psz_end + 1;
 
-            p_sys->pi_y_offsets = realloc_or_free( p_sys->pi_y_offsets,
+            p_sys->pi_y_offsets = xrealloc( p_sys->pi_y_offsets,
                                                    i_index * sizeof(int) );
-            assert( p_sys->pi_y_offsets );
             p_sys->pi_y_offsets[i_index - 1] = atoi( psz_offsets );
             psz_end = strchr( psz_offsets, ',' );
             psz_offsets = psz_end + 1;
@@ -364,9 +359,8 @@ static int CreateFilter( vlc_object_t *p_this )
         {
             psz_end = strchr( psz_order, ',' );
             i_index++;
-            p_sys->ppsz_order = realloc_or_free( p_sys->ppsz_order,
+            p_sys->ppsz_order = xrealloc( p_sys->ppsz_order,
                                                  i_index * sizeof(char *) );
-            assert( p_sys->ppsz_order );
             p_sys->ppsz_order[i_index - 1] = strndup( psz_order,
                                            psz_end - psz_order );
             psz_order = psz_end+1;
@@ -882,9 +876,8 @@ static int MosaicCallback( vlc_object_t *p_this, char const *psz_var,
             {
                 psz_end = strchr( psz_order, ',' );
                 i_index++;
-                p_sys->ppsz_order = realloc_or_free( p_sys->ppsz_order,
+                p_sys->ppsz_order = xrealloc( p_sys->ppsz_order,
                                                    i_index * sizeof(char *) );
-                assert( p_sys->ppsz_order );
                 p_sys->ppsz_order[i_index - 1] = strndup( psz_order,
                                            psz_end - psz_order );
                 psz_order = psz_end+1;