Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Bug in software demux still in 2.6.10



On Thu, Jan 06, 2005 at 02:03:49PM +0100, emard@softhome.net wrote:
> When we are at it, I'd like to discuss,
> because I'm not very in-depth contemplating
> the sections... look at this code from dvb_demux:
> 
>         if (buf[3] & 0x20) {
>                 /* adaption field present, check for discontinuity_indicator */
>                 if ((buf[4] > 0) && (buf[5] & 0x80))
>                         dc_i = 1;
>         }
> 
>         if (!ccok || dc_i) {
> #ifdef DVB_DEMUX_SECTION_LOSS_LOG
>                 printk("dvb_demux.c discontinuity detected %d bytes lost\n",
> 
> 
> First comment says check for discontinuity if adaptation field is present,
> but the next if does somehting else, therefore I'd say
> 
> Should       if (!ccok || dc_i) 
> be actually  if (!ccok && dc_i) ?

IMO it should be something like
if (!ccok && !dc_i)
because dc_i signals a discontinuity introduced by the transmitting
multiplexer, such that the assumption of data being lost does not
hold for this case.
However, if I understand ISO13818-1 correctly, one should also
have a look at wether the packet belongs to a PID carrying PCR or
not.

Wolfgang





Home | Main Index | Thread Index