aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-28 00:27:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-28 00:28:08 +0200
commit5313d60dc0f2287f61a900a1f2b9d910eeb2bdbf (patch)
tree64bf455e46b2bd22bd8b9ccbad7a5a8d126724cc
parent48a691630833d6b12905475b6bf39fef285872a9 (diff)
parent1d3eb0b5735f6dd72d2bf648455cf06ac7c24bc1 (diff)
downloadffmpeg-5313d60dc0f2287f61a900a1f2b9d910eeb2bdbf.tar.gz
Merge commit '1d3eb0b5735f6dd72d2bf648455cf06ac7c24bc1'
* commit '1d3eb0b5735f6dd72d2bf648455cf06ac7c24bc1': oggenc: Move ogg_write_pages up above ogg_write_header Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/oggenc.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 375abadd44..73bc0198b7 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -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];