[FFmpeg-cvslog] af_amix: switch to an AVOptions-based system.

Anton Khirnov git at videolan.org
Thu Apr 11 01:37:24 CEST 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Feb 25 21:21:29 2013 +0100| [ac20e3ab8ed497549ee2a62754f01eee5e7a5066] | committer: Anton Khirnov

af_amix: switch to an AVOptions-based system.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac20e3ab8ed497549ee2a62754f01eee5e7a5066
---

 libavfilter/af_amix.c |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 5a4ec2e..9aa917e 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -491,16 +491,7 @@ fail:
 static int init(AVFilterContext *ctx, const char *args)
 {
     MixContext *s = ctx->priv;
-    int i, ret;
-
-    s->class = &amix_class;
-    av_opt_set_defaults(s);
-
-    if ((ret = av_set_options_string(s, args, "=", ":")) < 0) {
-        av_log(ctx, AV_LOG_ERROR, "Error parsing options string '%s'.\n", args);
-        return ret;
-    }
-    av_opt_free(s);
+    int i;
 
     for (i = 0; i < s->nb_inputs; i++) {
         char name[32];
@@ -563,6 +554,7 @@ AVFilter avfilter_af_amix = {
     .name          = "amix",
     .description   = NULL_IF_CONFIG_SMALL("Audio mixing."),
     .priv_size     = sizeof(MixContext),
+    .priv_class    = &amix_class,
 
     .init           = init,
     .uninit         = uninit,



More information about the ffmpeg-cvslog mailing list