From 9767d7c092c890ecc5953452e8a951fd902dd67b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 25 May 2014 21:04:19 -0700 Subject: oggenc: Flush after writing headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ö --- libavformat/oggenc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat/oggenc.c') 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; } -- cgit v1.2.3