[FFmpeg-cvslog] avfiltergraph: use sizeof(var) instead of sizeof(type)
Anton Khirnov
git at videolan.org
Sat Mar 16 16:32:43 CET 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Feb 25 12:14:56 2013 +0100| [dd74e3ef339e89343cb3eefc8d9e91dcad8444f0] | committer: Anton Khirnov
avfiltergraph: use sizeof(var) instead of sizeof(type)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd74e3ef339e89343cb3eefc8d9e91dcad8444f0
---
libavfilter/avfiltergraph.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 7bbfc1c..516617e 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -39,7 +39,7 @@ static const AVClass filtergraph_class = {
AVFilterGraph *avfilter_graph_alloc(void)
{
- AVFilterGraph *ret = av_mallocz(sizeof(AVFilterGraph));
+ AVFilterGraph *ret = av_mallocz(sizeof(*ret));
if (!ret)
return NULL;
ret->av_class = &filtergraph_class;
@@ -61,7 +61,7 @@ void avfilter_graph_free(AVFilterGraph **graph)
int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter)
{
AVFilterContext **filters = av_realloc(graph->filters,
- sizeof(AVFilterContext*) * (graph->nb_filters + 1));
+ sizeof(*filters) * (graph->nb_filters + 1));
if (!filters)
return AVERROR(ENOMEM);
More information about the ffmpeg-cvslog
mailing list