+ }
+
+ if (bsf_options_str && filter->priv_class) {
+ const AVOption *opt = av_opt_next(s->bsfs[s->nb_bsfs - 1]->priv_data, NULL);
+ const char * shorthand[2] = {NULL};
+
+ if (opt)
+ shorthand[0] = opt->name;
+
+ ret = av_opt_set_from_string(s->bsfs[s->nb_bsfs - 1]->priv_data, bsf_options_str, shorthand, "=", ":");
+ if (ret < 0) {
+ if (ret != AVERROR(ENOMEM)) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid options for bitstream filter %s "
+ "requested by the decoder. This is a bug, please report it.\n",
+ bsf_name);
+ ret = AVERROR_BUG;
+ }
+ av_freep(&bsf);
+ goto fail;
+ }
+ }
+ av_freep(&bsf);