summaryrefslogtreecommitdiff
path: root/libavformat/oggenc.c
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2014-05-25 21:04:19 -0700
committerMartin Storsjö <martin@martin.st>2014-05-27 20:16:59 +0300
commit9767d7c092c890ecc5953452e8a951fd902dd67b (patch)
tree1520568c54f4766444a0dbc114adc082b48d4a23 /libavformat/oggenc.c
parent1d3eb0b5735f6dd72d2bf648455cf06ac7c24bc1 (diff)
oggenc: Flush after writing headers
Before, header information for ogg format files was sent with the first encoded packet. This patch makes it so that it is possible for API users to differentiate between headers and encoded audio. This is useful, for example, when creating an audio stream where you want to send one set of headers for every client that connects and then the encoded stream of audio. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/oggenc.c')
-rw-r--r--libavformat/oggenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 53a1e21605..e082a7e48a 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -541,6 +541,8 @@ static int ogg_write_header(AVFormatContext *s)
oggstream->page.start_granule = AV_NOPTS_VALUE;
+ ogg_write_pages(s, 1);
+
return 0;
}