aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-19 22:07:18 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-19 22:58:31 +0200
commit8f349b64813b348634042d96b9d104ada94dc538 (patch)
tree34357580468269a31e3cf31f3d62b380eeb8608e
parentc6e288a7cd3f92d09a59671f81119c9643d8589c (diff)
downloadffmpeg-8f349b64813b348634042d96b9d104ada94dc538.tar.gz
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 *).
-rw-r--r--libavfilter/formats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 58593fcce0..4a23c2f1b3 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -99,7 +99,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);