if (po->flags & OPT_STRING) {
char *str;
str = av_strdup(arg);
-// av_freep(dst);
+ av_freep(dst);
*(char **)dst = str;
} else if (po->flags & OPT_BOOL || po->flags & OPT_INT) {
*(int *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);
int ret = po->u.func_arg(optctx, opt, arg);
if (ret < 0) {
av_log(NULL, AV_LOG_ERROR,
- "Failed to set value '%s' for option '%s'\n", arg, opt);
+ "Failed to set value '%s' for option '%s': %s\n",
+ arg, opt, av_err2str(ret));
return ret;
}
}
if (consumed)
return 0;
+ av_log(NULL, AV_LOG_ERROR, "Could not find option '%s' in any of the FFmpeg subsystems "
+ "(codec, format, scaler, resampler contexts)\n", opt);
return AVERROR_OPTION_NOT_FOUND;
}