Commit bfe559d0 authored by ogg.k.ogg.k's avatar ogg.k.ogg.k Committed by Jean-Baptiste Kempf

add video streams' BOS packets first

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 6f2d1380
...@@ -619,16 +619,22 @@ static block_t *OggCreateHeader( sout_mux_t *p_mux ) ...@@ -619,16 +619,22 @@ static block_t *OggCreateHeader( sout_mux_t *p_mux )
/* Write header for each stream. All b_o_s (beginning of stream) packets /* Write header for each stream. All b_o_s (beginning of stream) packets
* must appear first in the ogg stream so we take care of them first. */ * must appear first in the ogg stream so we take care of them first. */
for( int pass = 0; pass < 2; pass++ )
{
for( i = 0; i < p_mux->i_nb_inputs; i++ ) for( i = 0; i < p_mux->i_nb_inputs; i++ )
{ {
sout_input_t *p_input = p_mux->pp_inputs[i]; sout_input_t *p_input = p_mux->pp_inputs[i];
ogg_stream_t *p_stream = (ogg_stream_t*)p_input->p_sys; ogg_stream_t *p_stream = (ogg_stream_t*)p_input->p_sys;
p_stream->b_new = false;
bool video = ( p_stream->i_fourcc == VLC_CODEC_THEORA || p_stream->i_fourcc == VLC_CODEC_DIRAC );
if( ( ( pass == 0 && !video ) || ( pass == 1 && video ) ) )
continue;
msg_Dbg( p_mux, "creating header for %4.4s", msg_Dbg( p_mux, "creating header for %4.4s",
(char *)&p_stream->i_fourcc ); (char *)&p_stream->i_fourcc );
ogg_stream_init( &p_stream->os, p_stream->i_serial_no ); ogg_stream_init( &p_stream->os, p_stream->i_serial_no );
p_stream->b_new = false;
p_stream->i_packet_no = 0; p_stream->i_packet_no = 0;
if( p_stream->i_fourcc == VLC_CODEC_VORBIS || if( p_stream->i_fourcc == VLC_CODEC_VORBIS ||
...@@ -701,6 +707,7 @@ static block_t *OggCreateHeader( sout_mux_t *p_mux ) ...@@ -701,6 +707,7 @@ static block_t *OggCreateHeader( sout_mux_t *p_mux )
block_ChainAppend( &p_hdr, p_og ); block_ChainAppend( &p_hdr, p_og );
} }
}
/* Take care of the non b_o_s headers */ /* Take care of the non b_o_s headers */
for( i = 0; i < p_mux->i_nb_inputs; i++ ) for( i = 0; i < p_mux->i_nb_inputs; i++ )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment