static int write_trailer(AVFormatContext *s)

{

    WVMuxContext *wc = s->priv_data;

    AVIOContext *pb = s->pb;



    ff_ape_write(s);



    if (pb->seekable) {

        avio_seek(pb, 12, SEEK_SET);

        avio_wl32(pb, wc->duration);

        avio_flush(pb);

    }



    return 0;

}

static int write_trailer(AVFormatContext *s)

{

    WVMuxContext *wc = s->priv_data;

    AVIOContext *pb = s->pb;



    ff_ape_write(s);



    if (pb->seekable) {

        avio_seek(pb, 12, SEEK_SET);

        avio_wl32(pb, wc->duration);

        avio_flush(pb);

    }



    return 0;

}

static int FUNC_0(AVFormatContext *VAR_0)

{

    WVMuxContext *wc = VAR_0->priv_data;

    AVIOContext *pb = VAR_0->pb;



    ff_ape_write(VAR_0);



    if (pb->seekable) {

        avio_seek(pb, 12, SEEK_SET);

        avio_wl32(pb, wc->duration);

        avio_flush(pb);

    }



    return 0;

}

static int FUNC_0(AVFormatContext *VAR_0)
{ WVMuxContext *wc = VAR_0->priv_data; AVIOContext *pb = VAR_0->pb; ff_ape_write(VAR_0); if (pb->seekable) { avio_seek(pb, 12, SEEK_SET); avio_wl32(pb, wc->duration); avio_flush(pb); } return 0; }