[FFmpeg-cvslog] r25707 - in trunk: doc/APIchanges libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/avfiltergraph.c libavfilter/graphparser.c tools/lavfi-showfiltfmts.c

stefano subversion
Mon Nov 8 13:32:39 CET 2010


Author: stefano
Date: Mon Nov  8 13:32:39 2010
New Revision: 25707

Log:
Rename avfilter_destroy() as avfilter_free().

The new name is shorter and more consistent with the FFmpeg API, and
sounds less evil.

Modified:
   trunk/doc/APIchanges
   trunk/libavfilter/avfilter.c
   trunk/libavfilter/avfilter.h
   trunk/libavfilter/avfiltergraph.c
   trunk/libavfilter/graphparser.c
   trunk/tools/lavfi-showfiltfmts.c

Modified: trunk/doc/APIchanges
==============================================================================
--- trunk/doc/APIchanges	Mon Nov  8 07:47:41 2010	(r25706)
+++ trunk/doc/APIchanges	Mon Nov  8 13:32:39 2010	(r25707)
@@ -13,6 +13,10 @@ libavutil:   2009-03-08
 
 API changes, most recent first:
 
+2010-11-08 - r25707 - lavfi 1.59.0 - avfilter_free()
+  Rename avfilter_destroy() to avfilter_free().
+  This change breaks libavfilter API/ABI.
+
 2010-11-07 - r25705 - lavfi 1.58.0 - avfiltergraph.h
   Remove graphparser.h header, move AVFilterInOut and
   avfilter_graph_parse() declarations to libavfilter/avfiltergraph.h.

Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c	Mon Nov  8 07:47:41 2010	(r25706)
+++ trunk/libavfilter/avfilter.c	Mon Nov  8 13:32:39 2010	(r25707)
@@ -527,7 +527,7 @@ int avfilter_open(AVFilterContext **filt
     return 0;
 }
 
-void avfilter_destroy(AVFilterContext *filter)
+void avfilter_free(AVFilterContext *filter)
 {
     int i;
     AVFilterLink *link;

Modified: trunk/libavfilter/avfilter.h
==============================================================================
--- trunk/libavfilter/avfilter.h	Mon Nov  8 07:47:41 2010	(r25706)
+++ trunk/libavfilter/avfilter.h	Mon Nov  8 13:32:39 2010	(r25707)
@@ -25,7 +25,7 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVFILTER_VERSION_MAJOR  1
-#define LIBAVFILTER_VERSION_MINOR 58
+#define LIBAVFILTER_VERSION_MINOR 59
 #define LIBAVFILTER_VERSION_MICRO  0
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
@@ -786,11 +786,11 @@ int avfilter_open(AVFilterContext **filt
 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.

Modified: trunk/libavfilter/avfiltergraph.c
==============================================================================
--- trunk/libavfilter/avfiltergraph.c	Mon Nov  8 07:47:41 2010	(r25706)
+++ trunk/libavfilter/avfiltergraph.c	Mon Nov  8 13:32:39 2010	(r25707)
@@ -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 *
                     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;
                     }
 

Modified: trunk/libavfilter/graphparser.c
==============================================================================
--- trunk/libavfilter/graphparser.c	Mon Nov  8 07:47:41 2010	(r25706)
+++ trunk/libavfilter/graphparser.c	Mon Nov  8 13:32:39 2010	(r25707)
@@ -118,7 +118,7 @@ static int create_filter(AVFilterContext
     }
 
     if ((ret = avfilter_graph_add_filter(ctx, *filt_ctx)) < 0) {
-        avfilter_destroy(*filt_ctx);
+        avfilter_free(*filt_ctx);
         return ret;
     }
 

Modified: trunk/tools/lavfi-showfiltfmts.c
==============================================================================
--- trunk/tools/lavfi-showfiltfmts.c	Mon Nov  8 07:47:41 2010	(r25706)
+++ trunk/tools/lavfi-showfiltfmts.c	Mon Nov  8 13:32:39 2010	(r25707)
@@ -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;
 }



More information about the ffmpeg-cvslog mailing list