[FFmpeg-cvslog] avcodec/bitstream_filter: Fix initializing options from the argument string

Michael Niedermayer git at videolan.org
Mon Apr 18 02:56:27 CEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Apr 18 00:06:13 2016 +0200| [81064795034ed0b304236dbdcb5ab3af36cf152a] | committer: Michael Niedermayer

avcodec/bitstream_filter: Fix initializing options from the argument string

Fixes ffmpeg ... -vbsf noise=234 ...

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/bitstream_filter.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/libavcodec/bitstream_filter.c b/libavcodec/bitstream_filter.c
index d9bafbe..02878e3 100644
--- a/libavcodec/bitstream_filter.c
+++ b/libavcodec/bitstream_filter.c
@@ -24,6 +24,7 @@
 #include "libavutil/atomic.h"
 #include "libavutil/internal.h"
 #include "libavutil/mem.h"
+#include "libavutil/opt.h"
 
 #if FF_API_OLD_BSF
 FF_DISABLE_DEPRECATION_WARNINGS
@@ -114,6 +115,16 @@ int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
 
         priv->ctx->time_base_in = avctx->time_base;
 
+        if (bsfc->args && bsfc->filter->priv_class) {
+            const AVOption *opt = av_opt_next(priv->ctx->priv_data, NULL);
+            const char * shorthand[2] = {NULL};
+
+            if (opt)
+                shorthand[0] = opt->name;
+
+            ret = av_opt_set_from_string(priv->ctx->priv_data, bsfc->args, shorthand, "=", ":");
+        }
+
         ret = av_bsf_init(priv->ctx);
         if (ret < 0)
             return ret;



More information about the ffmpeg-cvslog mailing list