History

avfiltergraph: use sizeof(var) instead of sizeof(type)

Anton Khirnov committed 13 years ago

Commit dd74e3e1 parent 42c7c611 file · +2 −2Browse files

Showing the changes to libavfilter/avfiltergraph.c (1 of 1 file). Show all

Unified · Split

libavfilter/avfiltergraph.c+2−2
@@ -39,7 +39,7 @@ static const AVClass filtergraph_class = { · 38 unmodified lines
3939
4040 AVFilterGraph *avfilter_graph_alloc(void)
4141 {
42− AVFilterGraph *ret = av_mallocz(sizeof(AVFilterGraph));
42+ AVFilterGraph *ret = av_mallocz(sizeof(*ret));
4343 if (!ret)
4444 return NULL;
4545 ret->av_class = &filtergraph_class;
@@ -61,7 +61,7 @@ void avfilter_graph_free(AVFilterGraph **graph) · 15 unmodified lines
6161 int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter)
6262 {
6363 AVFilterContext **filters = av_realloc(graph->filters,
64− sizeof(AVFilterContext*) * (graph->nb_filters + 1));
64+ sizeof(*filters) * (graph->nb_filters + 1));
6565 if (!filters)
6666 return AVERROR(ENOMEM);
6767

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t