static int url_connect(struct variant *var, AVDictionary *opts)

{

    AVDictionary *tmp = NULL;

    int ret;



    av_dict_copy(&tmp, opts, 0);



    av_opt_set_dict(var->input, &tmp);



    if ((ret = ffurl_connect(var->input, NULL)) < 0) {

        ffurl_close(var->input);

        var->input = NULL;

    }



    av_dict_free(&tmp);

    return ret;

}

static int url_connect(struct variant *var, AVDictionary *opts)

{

    AVDictionary *tmp = NULL;

    int ret;



    av_dict_copy(&tmp, opts, 0);



    av_opt_set_dict(var->input, &tmp);



    if ((ret = ffurl_connect(var->input, NULL)) < 0) {

        ffurl_close(var->input);

        var->input = NULL;

    }



    av_dict_free(&tmp);

    return ret;

}

static int FUNC_0(struct variant *VAR_0, AVDictionary *VAR_1)

{

    AVDictionary *tmp = NULL;

    int VAR_2;



    av_dict_copy(&tmp, VAR_1, 0);



    av_opt_set_dict(VAR_0->input, &tmp);



    if ((VAR_2 = ffurl_connect(VAR_0->input, NULL)) < 0) {

        ffurl_close(VAR_0->input);

        VAR_0->input = NULL;

    }



    av_dict_free(&tmp);

    return VAR_2;

}

static int FUNC_0(struct variant *VAR_0, AVDictionary *VAR_1)
{ AVDictionary *tmp = NULL; int VAR_2; av_dict_copy(&tmp, VAR_1, 0); av_opt_set_dict(VAR_0->input, &tmp); if ((VAR_2 = ffurl_connect(VAR_0->input, NULL)) < 0) { ffurl_close(VAR_0->input); VAR_0->input = NULL; } av_dict_free(&tmp); return VAR_2; }