summaryrefslogtreecommitdiff
path: root/libavfilter/formats.c
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-02-10 18:04:43 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-02-10 18:04:43 +0000
commit243370cb4dec0b1620cf741f71e5225c21060ffd (patch)
tree02e357745bd2e224af1a2bac4a214de6699081a0 /libavfilter/formats.c
parentbd8ae4885b905415f0e86d4e348c4b72be81e6e6 (diff)
Do not hardcode the type of AVFilterFormats.formats in allocation
Originally committed as revision 11897 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r--libavfilter/formats.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index ad1e793fa0..bd8ce6258f 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -29,8 +29,8 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
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_list(int len, ...)
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);