forked from FFmpeg/FFmpeg
avcodec/bitstream_filter: Fix initializing options from the argument string
Fixes ffmpeg ... -vbsf noise=234 ... Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
76d0209db4
commit
8106479503
1 changed files with 11 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
||||||
#include "libavutil/atomic.h"
|
#include "libavutil/atomic.h"
|
||||||
#include "libavutil/internal.h"
|
#include "libavutil/internal.h"
|
||||||
#include "libavutil/mem.h"
|
#include "libavutil/mem.h"
|
||||||
|
#include "libavutil/opt.h"
|
||||||
|
|
||||||
#if FF_API_OLD_BSF
|
#if FF_API_OLD_BSF
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
@ -114,6 +115,16 @@ int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
|
||||||
|
|
||||||
priv->ctx->time_base_in = avctx->time_base;
|
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);
|
ret = av_bsf_init(priv->ctx);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue