summaryrefslogtreecommitdiff
path: root/libavfilter/formats.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-19 22:07:18 +0200
committerAnton Khirnov <anton@khirnov.net>2011-09-28 08:03:18 +0200
commit0ec56d1144fa4ea36950295987bb5f49c9747046 (patch)
tree6f4bfb57c4c52fadc4c90e965b417d81ee78da35 /libavfilter/formats.c
parente63e4c99c9de88b6765911da85e49e7e3be91bf0 (diff)
lavfi: fix realloc size computation in avfilter_add_format()
Replace sizeof((*avff)->formats) with sizeof(*(*avff)->formats) as the size of the array element is given by the pointed element rather than by its pointer. In particular fix computation with the pending patch when sizeof(int64_t) != sizeof(int64_t *). Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r--libavfilter/formats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index bb7b921552..ae916cf16c 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -94,7 +94,7 @@ int avfilter_add_format(AVFilterFormats **avff, int fmt)
return AVERROR(ENOMEM);
fmts = av_realloc((*avff)->formats,
- sizeof((*avff)->formats) * ((*avff)->format_count+1));
+ sizeof(*(*avff)->formats) * ((*avff)->format_count+1));
if (!fmts)
return AVERROR(ENOMEM);