Re: [PULL] http://udev.netup.ru/hg/v4l-dvb-aospan

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

 



Mauro,

Please pull new changes -
http://udev.netup.ru/hg/v4l-dvb-aospan/rev/db2114ac07ed

> > +#define dprintk_tscheck(x...) do { \
> > +	if (dvb_demux_tscheck && printk_ratelimit()) printk(x); } while (0)
> 
> checkpatch.pl is not perfect. The better is to break the macro as I've shown on
> my previous email, breaking one statement per line:
done.
> No need for an empty line here. Please remove to keep all vars together.
done.

> > +	int cnt_pid;
> 
> unsigned cnt_pid;
changed to "pid" var. Thanks for Andreas Oberritter.

> > +
> > +	if (dvb_demux_tscheck) {
> > +
> No need for an empty line here.
done.


> Please add a define for 0x1fff and use the define, instead of using a magic value at vmalloc, like:
> #define MAX_PID	0x1ffe
done.

> You need to add a check to see if the vmalloc really worked.
> Also, if you don't have memory for the first packet, it doesn't make sense to
> keep insisting on allocating memory. Better just to disable the check. So, I
> would code it like:
done.

> > +		/* check pkt counter */
> > +		cnt_pid = ((buf[1] & 0x1f)<<8) | buf[2];
> > +
> > +		if (cnt_pid != 0x1fff) {
> if (cnt_pid <= MAX_PID) {

changed for "if (cnt_pid < MAX_PID)" because PID=0x1FFF should be
ignored ( padding NULL packets - described in
http://en.wikipedia.org/wiki/MPEG_transport_stream ).

> > +			if ((buf[3] & 0xf) != demux->cnt_storage[cnt_pid])
> > +				dprintk_tscheck("TS packet counter mismatch. PID=0x%x expected 0x%x got 0x%x\n",\
> > +						cnt_pid, demux->cnt_storage[cnt_pid], buf[3] & 0xf);
> Please, don't add the backslash. Also, in order to have it 80-line compliant, you could break the strings as:
done.

> In order to work with the lack of memory, you'll need a label here:
> no_dvb_demux_tscheck
done.

-- 
Abylai Ospan <aospan@xxxxxxxx>
NetUP Inc.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux