Showing the changes to libavfilter/avfiltergraph.c (1 of 1 file). Show all
Unified · Split
| @@ -39,7 +39,7 @@ static const AVClass filtergraph_class = { · 38 unmodified lines | |||
| 39 | 39 | ||
| 40 | AVFilterGraph *avfilter_graph_alloc(void) | 40 | AVFilterGraph *avfilter_graph_alloc(void) |
| 41 | { | 41 | { |
| 42 | AVFilterGraph *ret = av_mallocz(sizeof(AVFilterGraph)); | 42 | AVFilterGraph *ret = av_mallocz(sizeof(*ret)); |
| 43 | if (!ret) | 43 | if (!ret) |
| 44 | return NULL; | 44 | return NULL; |
| 45 | ret->av_class = &filtergraph_class; | 45 | ret->av_class = &filtergraph_class; |
| @@ -61,7 +61,7 @@ void avfilter_graph_free(AVFilterGraph **graph) · 15 unmodified lines | |||
| 61 | int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter) | 61 | int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter) |
| 62 | { | 62 | { |
| 63 | AVFilterContext **filters = av_realloc(graph->filters, | 63 | AVFilterContext **filters = av_realloc(graph->filters, |
| 64 | sizeof(AVFilterContext*) * (graph->nb_filters + 1)); | 64 | sizeof(*filters) * (graph->nb_filters + 1)); |
| 65 | if (!filters) | 65 | if (!filters) |
| 66 | return AVERROR(ENOMEM); | 66 | return AVERROR(ENOMEM); |
| 67 | 67 | ||