From f87986e401407123a0a940dc8ebf0cc0192e57c7 Mon Sep 17 00:00:00 2001 From: "ogg.k.ogg.k" Date: Wed, 29 Jul 2009 18:20:26 +0100 Subject: [PATCH] non BOS headers for (Vorbis, Theora, Speex, Kate) do not have to be on separate pages, so avoid flushing before the last header Signed-off-by: Laurent Aimar --- modules/mux/ogg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c index abe139b731..8b3c024d1b 100644 --- a/modules/mux/ogg.c +++ b/modules/mux/ogg.c @@ -747,8 +747,12 @@ static block_t *OggCreateHeader( sout_mux_t *p_mux ) op.packetno = p_stream->i_packet_no++; ogg_stream_packetin( &p_stream->os, &op ); - p_og = OggStreamFlush( p_mux, &p_stream->os, 0 ); - block_ChainAppend( &p_hdr, p_og ); + if( j == 0 ) + p_og = OggStreamFlush( p_mux, &p_stream->os, 0 ); + else + p_og = OggStreamPageOut( p_mux, &p_stream->os, 0 ); + if( p_og ) + block_ChainAppend( &p_hdr, p_og ); } } else if( p_stream->i_fourcc != VLC_CODEC_FLAC && -- 2.39.2