[vlc-devel] [PATCH] emit video BOS packet before other BOS packets
Laurent Aimar
fenrir at via.ecp.fr
Wed Jul 29 23:15:27 CEST 2009
Hi,
On Wed, Jul 29, 2009, ogg.k.ogg.k at googlemail.com wrote:
> Placing video stream BOS packets first is a recommendation of Ogg.
> Also attached is a diff -b as it's much easier to review as most of the
> patch is indentation.
Thanks for the version without the indentation :)
Could you resend it using git format-patch for application ?
Here some remarks but take them into account *only* if you like.
> diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
> index b6ed947..5ec9a2f 100644
> --- a/modules/mux/ogg.c
> +++ b/modules/mux/ogg.c
> @@ -621,16 +621,22 @@ static block_t *OggCreateHeader( sout_mux_t *p_mux )
> block_t *p_og = NULL;
> ogg_packet op;
> uint8_t *p_extra;
> - int i, i_extra;
> + int pass, i, i_extra;
>
> /* 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. */
> + for( pass = 0; pass < 2; pass++ )
I think that for such loop variable it is cleaner to declare them in the
for(). We allow c99 in VLC.
> + bool video = ( p_stream->i_fourcc == VLC_CODEC_THEORA || p_stream->i_fourcc == VLC_CODEC_DIRAC );
> + if( ( ( pass == 0 && !video ) || ( pass == 1 && video ) ) )
if( (pass == 0) != video )
might be better, but depends on one's taste I think.
--
fenrir
More information about the vlc-devel
mailing list