static void ogg_write_pages(AVFormatContext *s, int flush)

{

    OGGContext *ogg = s->priv_data;

    OGGPageList *next, *p;



    if (!ogg->page_list)

        return;



    for (p = ogg->page_list; p; ) {

        OGGStreamContext *oggstream =

            s->streams[p->page.stream_index]->priv_data;

        if (oggstream->page_count < 2 && !flush)

            break;

        ogg_write_page(s, &p->page,

                       flush && oggstream->page_count == 1 ? 4 : 0); // eos

        next = p->next;

        av_freep(&p);

        p = next;

    }

    ogg->page_list = p;

}

static void ogg_write_pages(AVFormatContext *s, int flush)

{

    OGGContext *ogg = s->priv_data;

    OGGPageList *next, *p;



    if (!ogg->page_list)

        return;



    for (p = ogg->page_list; p; ) {

        OGGStreamContext *oggstream =

            s->streams[p->page.stream_index]->priv_data;

        if (oggstream->page_count < 2 && !flush)

            break;

        ogg_write_page(s, &p->page,

                       flush && oggstream->page_count == 1 ? 4 : 0); 

        next = p->next;

        av_freep(&p);

        p = next;

    }

    ogg->page_list = p;

}

static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)

{

    OGGContext *ogg = VAR_0->priv_data;

    OGGPageList *next, *p;



    if (!ogg->page_list)

        return;



    for (p = ogg->page_list; p; ) {

        OGGStreamContext *oggstream =

            VAR_0->streams[p->page.stream_index]->priv_data;

        if (oggstream->page_count < 2 && !VAR_1)

            break;

        ogg_write_page(VAR_0, &p->page,

                       VAR_1 && oggstream->page_count == 1 ? 4 : 0); 

        next = p->next;

        av_freep(&p);

        p = next;

    }

    ogg->page_list = p;

}

static void FUNC_0(AVFormatContext *VAR_0, int VAR_1)
{ OGGContext *ogg = VAR_0->priv_data; OGGPageList *next, *p; if (!ogg->page_list)
return; for (p = ogg->page_list; p; ) { OGGStreamContext *oggstream =
VAR_0->streams[p->page.stream_index]->priv_data; if (oggstream->page_count < 2 && !VAR_1)
break; ogg_write_page(VAR_0, &p->page,
VAR_1 && oggstream->page_count == 1 ? 4 : 0); next = p->next; av_freep(&p); p = next; } ogg->page_list = p; }