Merge commit '1ba95a9cca57b023b9b9de071a5671fc05b05e58'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 12 Apr 2013 12:25:27 +0000 (14:25 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 12 Apr 2013 12:25:27 +0000 (14:25 +0200)
* commit '1ba95a9cca57b023b9b9de071a5671fc05b05e58':
  lavfi: add avfilter_init_dict() for initializing a filter with a dict.

Conflicts:
libavfilter/avfilter.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
doc/APIchanges
libavfilter/avfilter.c
libavfilter/avfilter.h

diff --cc doc/APIchanges
Simple merge
@@@ -688,6 -515,26 +688,28 @@@ int avfilter_init_filter(AVFilterContex
  }
  #endif
  
 -    if (ctx->filter->init)
+ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options)
+ {
+     int ret = 0;
+     if (ctx->filter->priv_class) {
+         ret = av_opt_set_dict(ctx->priv, options);
+         if (ret < 0) {
+             av_log(ctx, AV_LOG_ERROR, "Error applying options to the filter.\n");
+             return ret;
+         }
+     }
++    if (ctx->filter->init_opaque)
++        ret = ctx->filter->init_opaque(ctx, NULL);
++    else if (ctx->filter->init)
+         ret = ctx->filter->init(ctx);
+     else if (ctx->filter->init_dict)
+         ret = ctx->filter->init_dict(ctx, options);
+     return ret;
+ }
  int avfilter_init_str(AVFilterContext *filter, const char *args)
  {
      AVDictionary *options = NULL;
Simple merge