[vlc-devel] [PATCH] misc fixes for kate decoder
ogg.k.ogg.k at googlemail.com
ogg.k.ogg.k at googlemail.com
Mon Nov 3 17:57:31 CET 2008
On 11/3/08, Rémi Denis-Courmont <rem at videolan.org> wrote:
> - if( p_sys->i_headers >= p_sys->i_num_headers )
> + if( p_sys->i_headers >= p_sys->i_num_headers &&
> p_sys->i_num_headers
>> 0)
>
> might be correct (I don't know kate), but looks suspicious compared to
> if( p_sys->i_headers > p_sys->i_num_headers )
This code was modelled after the Vorbis and Theora decoders, as
Kate uses the same kind of packetizing. A difference is that the number
of headers isn't fixed but specified in the first header, so i_num_headers
is initialized to 0 first, before the actual number is known. I suppose a
different way of doing it would be to initialize it to 255 (number of headers
is encoded as 8 bits), but rereading this, it does look correct to me: it
just doesn't assume all headers have been seen if none have been seen
(as the BOS header will always be there).
Thanks
More information about the vlc-devel
mailing list