[FFmpeg-devel] [PATCH 3/3] Rename avfilter_destroy() as avfilter_free().
Stefano Sabatini
stefano.sabatini-lala
Mon Nov 8 00:00:26 CET 2010
The new name is shorter and more consistent with the FFmpeg API, and
sounds less evil.
---
libavfilter/avfilter.c | 2 +-
libavfilter/avfilter.h | 6 +++---
libavfilter/avfiltergraph.c | 4 ++--
libavfilter/graphparser.c | 2 +-
tools/lavfi-showfiltfmts.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index db85718..fa15b35 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -527,7 +527,7 @@ int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *in
return 0;
}
-void avfilter_destroy(AVFilterContext *filter)
+void avfilter_free(AVFilterContext *filter)
{
int i;
AVFilterLink *link;
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 544c2e9..3f00392 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -786,11 +786,11 @@ int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *in
int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque);
/**
- * Destroy a filter.
+ * Free a filter context.
*
- * @param filter the filter to destroy
+ * @param filter the filter to free
*/
-void avfilter_destroy(AVFilterContext *filter);
+void avfilter_free(AVFilterContext *filter);
/**
* Insert a filter in the middle of an existing link.
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 6ce312b..16c0355 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -34,7 +34,7 @@ AVFilterGraph *avfilter_graph_alloc(void)
void avfilter_graph_free(AVFilterGraph *graph)
{
for(; graph->filter_count > 0; graph->filter_count --)
- avfilter_destroy(graph->filters[graph->filter_count - 1]);
+ avfilter_free(graph->filters[graph->filter_count - 1]);
av_freep(&graph->scale_sws_opts);
av_freep(&graph->filters);
}
@@ -143,7 +143,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->scale_sws_opts);
if(!scale || scale->filter->init(scale, scale_args, NULL) ||
avfilter_insert_filter(link, scale, 0, 0)) {
- avfilter_destroy(scale);
+ avfilter_free(scale);
return -1;
}
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 1bce3bc..4266e81 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -118,7 +118,7 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
}
if ((ret = avfilter_graph_add_filter(ctx, *filt_ctx)) < 0) {
- avfilter_destroy(*filt_ctx);
+ avfilter_free(*filt_ctx);
return ret;
}
diff --git a/tools/lavfi-showfiltfmts.c b/tools/lavfi-showfiltfmts.c
index 34a6208..19bb6f6 100644
--- a/tools/lavfi-showfiltfmts.c
+++ b/tools/lavfi-showfiltfmts.c
@@ -93,7 +93,7 @@ int main(int argc, char **argv)
av_pix_fmt_descriptors[fmts->formats[j]].name);
}
- avfilter_destroy(filter_ctx);
+ avfilter_free(filter_ctx);
fflush(stdout);
return 0;
}
--
1.7.1
More information about the ffmpeg-devel
mailing list