static int ogg_write_trailer(AVFormatContext *s)

{

    int i;



    /* flush current page */

    for (i = 0; i < s->nb_streams; i++)

        ogg_buffer_page(s, s->streams[i]->priv_data);



    ogg_write_pages(s, 1);



    for (i = 0; i < s->nb_streams; i++) {

        AVStream *st = s->streams[i];

        OGGStreamContext *oggstream = st->priv_data;

        if (st->codec->codec_id == CODEC_ID_FLAC ||

            st->codec->codec_id == CODEC_ID_SPEEX) {

            av_free(oggstream->header[0]);


        }



        av_freep(&st->priv_data);

    }

    return 0;

}
static int ogg_write_trailer(AVFormatContext *s)

{

    int i;



    

    for (i = 0; i < s->nb_streams; i++)

        ogg_buffer_page(s, s->streams[i]->priv_data);



    ogg_write_pages(s, 1);



    for (i = 0; i < s->nb_streams; i++) {

        AVStream *st = s->streams[i];

        OGGStreamContext *oggstream = st->priv_data;

        if (st->codec->codec_id == CODEC_ID_FLAC ||

            st->codec->codec_id == CODEC_ID_SPEEX) {

            av_free(oggstream->header[0]);


        }



        av_freep(&st->priv_data);

    }

    return 0;

}
static int FUNC_0(AVFormatContext *VAR_0)

{

    int VAR_1;



    

    for (VAR_1 = 0; VAR_1 < VAR_0->nb_streams; VAR_1++)

        ogg_buffer_page(VAR_0, VAR_0->streams[VAR_1]->priv_data);



    ogg_write_pages(VAR_0, 1);



    for (VAR_1 = 0; VAR_1 < VAR_0->nb_streams; VAR_1++) {

        AVStream *st = VAR_0->streams[VAR_1];

        OGGStreamContext *oggstream = st->priv_data;

        if (st->codec->codec_id == CODEC_ID_FLAC ||

            st->codec->codec_id == CODEC_ID_SPEEX) {

            av_free(oggstream->header[0]);


        }



        av_freep(&st->priv_data);

    }

    return 0;

}
static int FUNC_0(AVFormatContext *VAR_0)
{ int VAR_1; for (VAR_1 = 0; VAR_1 < VAR_0->nb_streams; VAR_1++) ogg_buffer_page(VAR_0, VAR_0->streams[VAR_1]->priv_data); ogg_write_pages(VAR_0, 1); for (VAR_1 = 0; VAR_1 < VAR_0->nb_streams; VAR_1++) { AVStream *st = VAR_0->streams[VAR_1]; OGGStreamContext *oggstream = st->priv_data; if (st->codec->codec_id == CODEC_ID_FLAC ||
st->codec->codec_id == CODEC_ID_SPEEX) { av_free(oggstream->header[0]); } av_freep(&st->priv_data); } return 0; }