[FFmpeg-devel] [PATCH] avfilter: remove opaque passing hacks

Michael Niedermayer michaelni at gmx.at
Fri Apr 12 02:14:46 CEST 2013


Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavfilter/avfilter.c      |   11 +----------
 libavfilter/avfiltergraph.c |    2 +-
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 3c19744..b438e64 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -701,7 +701,6 @@ static int filter_use_deprecated_init(const char *name)
             return 1;
     return 0;
 }
-#if 0
 #if FF_API_AVFILTER_INIT_FILTER
 int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque)
 {
@@ -710,14 +709,6 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
 #endif
 
 int avfilter_init_str(AVFilterContext *filter, const char *args)
-#else
-int avfilter_init_str(AVFilterContext *filter, const char *args)
-{
-    return avfilter_init_filter(filter, args, NULL);
-}
-
-int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque)
-#endif
 {
     AVDictionary *options = NULL;
     AVDictionaryEntry *e;
@@ -871,7 +862,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
     }
 
     if (filter->filter->init_opaque)
-        ret = filter->filter->init_opaque(filter, args, opaque);
+        ret = filter->filter->init_opaque(filter, args, NULL);
     else if (filter->filter->init)
         ret = filter->filter->init(filter, args);
     else if (filter->filter->init_dict)
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 3e1d5ef..582a870 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -119,7 +119,7 @@ int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt,
     if (!*filt_ctx)
         return AVERROR(ENOMEM);
 
-    ret = avfilter_init_filter(*filt_ctx, args, opaque);
+    ret = avfilter_init_str(*filt_ctx, args);
     if (ret < 0)
         goto fail;
 
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list