Commit 5313d60d authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '1d3eb0b5'

* commit '1d3eb0b5':
  oggenc: Move ogg_write_pages up above ogg_write_header
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 48a69163 1d3eb0b5
......@@ -392,6 +392,28 @@ static int ogg_build_opus_headers(AVCodecContext *avctx,
return 0;
}
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 int ogg_write_header(AVFormatContext *s)
{
OGGContext *ogg = s->priv_data;
......@@ -531,28 +553,6 @@ static int ogg_write_header(AVFormatContext *s)
return 0;
}
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 int ogg_write_packet(AVFormatContext *s, AVPacket *pkt)
{
AVStream *st = s->streams[pkt->stream_index];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment