Commit a98043ed authored by vitor's avatar vitor

Do not hardcode the type of AVFilterFormats.formats in allocation


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11897 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8b1b2476
...@@ -29,8 +29,8 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b) ...@@ -29,8 +29,8 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
ret = av_mallocz(sizeof(AVFilterFormats)); ret = av_mallocz(sizeof(AVFilterFormats));
/* merge list of formats */ /* merge list of formats */
ret->formats = av_malloc(sizeof(int) * FFMIN(a->format_count, ret->formats = av_malloc(sizeof(*ret->formats) * FFMIN(a->format_count,
b->format_count)); b->format_count));
for(i = 0; i < a->format_count; i ++) for(i = 0; i < a->format_count; i ++)
for(j = 0; j < b->format_count; j ++) for(j = 0; j < b->format_count; j ++)
if(a->formats[i] == b->formats[j]) if(a->formats[i] == b->formats[j])
...@@ -72,7 +72,7 @@ AVFilterFormats *avfilter_make_format_list(int len, ...) ...@@ -72,7 +72,7 @@ AVFilterFormats *avfilter_make_format_list(int len, ...)
va_list vl; va_list vl;
ret = av_mallocz(sizeof(AVFilterFormats)); ret = av_mallocz(sizeof(AVFilterFormats));
ret->formats = av_malloc(sizeof(int) * len); ret->formats = av_malloc(sizeof(*ret->formats) * len);
ret->format_count = len; ret->format_count = len;
va_start(vl, len); va_start(vl, len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment