[FFmpeg-cvslog] r11897 - trunk/libavfilter/formats.c

vitor subversion
Sun Feb 10 19:04:43 CET 2008


Author: vitor
Date: Sun Feb 10 19:04:43 2008
New Revision: 11897

Log:
Do not hardcode the type of AVFilterFormats.formats in allocation


Modified:
   trunk/libavfilter/formats.c

Modified: trunk/libavfilter/formats.c
==============================================================================
--- trunk/libavfilter/formats.c	(original)
+++ trunk/libavfilter/formats.c	Sun Feb 10 19:04:43 2008
@@ -29,8 +29,8 @@ AVFilterFormats *avfilter_merge_formats(
     ret = av_mallocz(sizeof(AVFilterFormats));
 
     /* merge list of formats */
-    ret->formats = av_malloc(sizeof(int) * FFMIN(a->format_count,
-                                                 b->format_count));
+    ret->formats = av_malloc(sizeof(*ret->formats) * FFMIN(a->format_count,
+                                                           b->format_count));
     for(i = 0; i < a->format_count; i ++)
         for(j = 0; j < b->format_count; j ++)
             if(a->formats[i] == b->formats[j])
@@ -72,7 +72,7 @@ AVFilterFormats *avfilter_make_format_li
     va_list vl;
 
     ret = av_mallocz(sizeof(AVFilterFormats));
-    ret->formats = av_malloc(sizeof(int) * len);
+    ret->formats = av_malloc(sizeof(*ret->formats) * len);
     ret->format_count = len;
 
     va_start(vl, len);




More information about the ffmpeg-cvslog mailing list