[FFmpeg-devel] [PATCH] lavfi/yadif: move init() definition before uninit()

Stefano Sabatini stefasab at gmail.com
Wed Jan 2 17:20:59 CET 2013


---
 libavfilter/vf_yadif.c |   48 ++++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 040c623..901ef30 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -296,6 +296,30 @@ static int request_frame(AVFilterLink *link)
     return 0;
 }
 
+static av_cold int init(AVFilterContext *ctx, const char *args)
+{
+    YADIFContext *yadif = ctx->priv;
+
+    yadif->mode = 0;
+    yadif->parity = -1;
+    yadif->auto_enable = 0;
+    yadif->csp = NULL;
+
+    if (args)
+        sscanf(args, "%d:%d:%d",
+               &yadif->mode, &yadif->parity, &yadif->auto_enable);
+
+    yadif->filter_line = filter_line_c;
+
+    if (ARCH_X86)
+        ff_yadif_init_x86(yadif);
+
+    av_log(ctx, AV_LOG_VERBOSE, "mode:%d parity:%d auto_enable:%d\n",
+           yadif->mode, yadif->parity, yadif->auto_enable);
+
+    return 0;
+}
+
 static av_cold void uninit(AVFilterContext *ctx)
 {
     YADIFContext *yadif = ctx->priv;
@@ -338,30 +362,6 @@ static int query_formats(AVFilterContext *ctx)
     return 0;
 }
 
-static av_cold int init(AVFilterContext *ctx, const char *args)
-{
-    YADIFContext *yadif = ctx->priv;
-
-    yadif->mode = 0;
-    yadif->parity = -1;
-    yadif->auto_enable = 0;
-    yadif->csp = NULL;
-
-    if (args)
-        sscanf(args, "%d:%d:%d",
-               &yadif->mode, &yadif->parity, &yadif->auto_enable);
-
-    yadif->filter_line = filter_line_c;
-
-    if (ARCH_X86)
-        ff_yadif_init_x86(yadif);
-
-    av_log(ctx, AV_LOG_VERBOSE, "mode:%d parity:%d auto_enable:%d\n",
-           yadif->mode, yadif->parity, yadif->auto_enable);
-
-    return 0;
-}
-
 static int config_props(AVFilterLink *link)
 {
     AVFilterContext *ctx = link->src;
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list