static void close_file(OutputStream *os)

{

    int64_t pos = avio_tell(os->out);

    avio_seek(os->out, 0, SEEK_SET);

    avio_wb32(os->out, pos);

    avio_flush(os->out);

    avio_close(os->out);

    os->out = NULL;

}

static void close_file(OutputStream *os)

{

    int64_t pos = avio_tell(os->out);

    avio_seek(os->out, 0, SEEK_SET);

    avio_wb32(os->out, pos);

    avio_flush(os->out);

    avio_close(os->out);

    os->out = NULL;

}

static void FUNC_0(OutputStream *VAR_0)

{

    int64_t pos = avio_tell(VAR_0->out);

    avio_seek(VAR_0->out, 0, SEEK_SET);

    avio_wb32(VAR_0->out, pos);

    avio_flush(VAR_0->out);

    avio_close(VAR_0->out);

    VAR_0->out = NULL;

}

static void FUNC_0(OutputStream *VAR_0)
{ int64_t pos = avio_tell(VAR_0->out); avio_seek(VAR_0->out, 0, SEEK_SET); avio_wb32(VAR_0->out, pos); avio_flush(VAR_0->out); avio_close(VAR_0->out); VAR_0->out = NULL; }