int av_opt_set_dict(void *obj, AVDictionary **options)
{
    AVDictionaryEntry *t = NULL;
    AVDictionary    *tmp = NULL;
    int ret = 0;
    while ((t = av_dict_get(*options, "", t, AV_DICT_IGNORE_SUFFIX))) {
        ret = av_opt_set(obj, t->key, t->value, 0);
        if (ret == AVERROR_OPTION_NOT_FOUND)
            av_dict_set(&tmp, t->key, t->value, 0);
        else if (ret < 0) {
            av_log(obj, AV_LOG_ERROR, "Error setting option %s to value %s.\n", t->key, t->value);
            break;
        }
        ret = 0;
    }
    av_dict_free(options);
    *options = tmp;
    return ret;
}
int av_opt_set_dict(void *obj, AVDictionary **options)
{
    AVDictionaryEntry *t = NULL;
    AVDictionary    *tmp = NULL;
    int ret = 0;
    while ((t = av_dict_get(*options, "", t, AV_DICT_IGNORE_SUFFIX))) {
        ret = av_opt_set(obj, t->key, t->value, 0);
        if (ret == AVERROR_OPTION_NOT_FOUND)
            av_dict_set(&tmp, t->key, t->value, 0);
        else if (ret < 0) {
            av_log(obj, AV_LOG_ERROR, "Error setting option %s to value %s.\n", t->key, t->value);
            break;
        }
        ret = 0;
    }
    av_dict_free(options);
    *options = tmp;
    return ret;
}
int FUNC_0(void *VAR_0, AVDictionary **VAR_1)
{
    AVDictionaryEntry *t = NULL;
    AVDictionary    *tmp = NULL;
    int VAR_2 = 0;
    while ((t = av_dict_get(*VAR_1, "", t, AV_DICT_IGNORE_SUFFIX))) {
        VAR_2 = av_opt_set(VAR_0, t->key, t->value, 0);
        if (VAR_2 == AVERROR_OPTION_NOT_FOUND)
            av_dict_set(&tmp, t->key, t->value, 0);
        else if (VAR_2 < 0) {
            av_log(VAR_0, AV_LOG_ERROR, "Error setting option %s to value %s.\n", t->key, t->value);
            break;
        }
        VAR_2 = 0;
    }
    av_dict_free(VAR_1);
    *VAR_1 = tmp;
    return VAR_2;
}
int FUNC_0(void *VAR_0, AVDictionary **VAR_1)
{ AVDictionaryEntry *t = NULL; AVDictionary    *tmp = NULL; int VAR_2 = 0; while ((t = av_dict_get(*VAR_1, "", t, AV_DICT_IGNORE_SUFFIX))) { VAR_2 = av_opt_set(VAR_0, t->key, t->value, 0); if (VAR_2 == AVERROR_OPTION_NOT_FOUND)
av_dict_set(&tmp, t->key, t->value, 0); else if (VAR_2 < 0) { av_log(VAR_0, AV_LOG_ERROR, "Error setting option %s to value %s.\n", t->key, t->value); break; } VAR_2 = 0; } av_dict_free(VAR_1); *VAR_1 = tmp; return VAR_2; }