int avio_open2(AVIOContext **s, const char *filename, int flags,

               const AVIOInterruptCB *int_cb, AVDictionary **options)

{

    URLContext *h;

    int err;



    err = ffurl_open(&h, filename, flags, int_cb, options);

    if (err < 0)

        return err;

    err = ffio_fdopen(s, h);

    if (err < 0) {

        ffurl_close(h);

        return err;

    }

    return 0;

}

int avio_open2(AVIOContext **s, const char *filename, int flags,

               const AVIOInterruptCB *int_cb, AVDictionary **options)

{

    URLContext *h;

    int err;



    err = ffurl_open(&h, filename, flags, int_cb, options);

    if (err < 0)

        return err;

    err = ffio_fdopen(s, h);

    if (err < 0) {

        ffurl_close(h);

        return err;

    }

    return 0;

}

int FUNC_0(AVIOContext **VAR_0, const char *VAR_1, int VAR_2,

               const AVIOInterruptCB *VAR_3, AVDictionary **VAR_4)

{

    URLContext *h;

    int VAR_5;



    VAR_5 = ffurl_open(&h, VAR_1, VAR_2, VAR_3, VAR_4);

    if (VAR_5 < 0)

        return VAR_5;

    VAR_5 = ffio_fdopen(VAR_0, h);

    if (VAR_5 < 0) {

        ffurl_close(h);

        return VAR_5;

    }

    return 0;

}

int FUNC_0(AVIOContext **VAR_0, const char *VAR_1, int VAR_2,
const AVIOInterruptCB *VAR_3, AVDictionary **VAR_4)
{ URLContext *h; int VAR_5; VAR_5 = ffurl_open(&h, VAR_1, VAR_2, VAR_3, VAR_4); if (VAR_5 < 0)
return VAR_5; VAR_5 = ffio_fdopen(VAR_0, h); if (VAR_5 < 0) { ffurl_close(h); return VAR_5; } return 0; }