]> git.sesse.net Git - vlc/blobdiff - modules/mux/ogg.c
non BOS headers for (Vorbis, Theora, Speex, Kate) do not have to be on separate pages...
[vlc] / modules / mux / ogg.c
index abe139b731abc4e5bbc02c70ef31bf214d735ffb..8b3c024d1bc76b5b215c82718981dafcbe773e35 100644 (file)
@@ -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 &&