Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180346
b: refs/heads/master
c: bc081cc
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Feb 8, 2010
1 parent 77b506b commit 68dd344
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: adefdceef4c1cefee2678724cd57824c8ca80091
refs/heads/master: bc081cc8693800ebb118cc2cc6a859dd0b45921b
19 changes: 8 additions & 11 deletions trunk/drivers/media/dvb/dvb-core/dvb_demux.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,16 +426,7 @@ static void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf)
};
};

if (dvb_demux_tscheck) {
if (!demux->cnt_storage)
demux->cnt_storage = vmalloc(MAX_PID + 1);

if (!demux->cnt_storage) {
printk(KERN_WARNING "Couldn't allocate memory for TS/TEI check. Disabling it\n");
dvb_demux_tscheck = 0;
goto no_dvb_demux_tscheck;
}

if (demux->cnt_storage) {
/* check pkt counter */
if (pid < MAX_PID) {
if (buf[1] & 0x80)
Expand All @@ -454,7 +445,6 @@ static void dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf)
};
/* end check */
};
no_dvb_demux_tscheck:

list_for_each_entry(feed, &demux->feed_list, list_head) {
if ((feed->pid != pid) && (feed->pid != 0x2000))
Expand Down Expand Up @@ -1258,6 +1248,13 @@ int dvb_dmx_init(struct dvb_demux *dvbdemux)
dvbdemux->feed[i].index = i;
}

if (dvb_demux_tscheck) {
dvbdemux->cnt_storage = vmalloc(MAX_PID + 1);

if (!dvbdemux->cnt_storage)
printk(KERN_WARNING "Couldn't allocate memory for TS/TEI check. Disabling it\n");
}

INIT_LIST_HEAD(&dvbdemux->frontend_list);

for (i = 0; i < DMX_TS_PES_OTHER; i++) {
Expand Down

0 comments on commit 68dd344

Please sign in to comment.