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
HI
I just browsed the code and saw that those if's make
it step out of normal procedure, it might be not
nice to call them this way, so I'd propose a this
kind of fix. As I currently have (again) hardware
failure I can't test it - can you verify if this
patch would fix your issue in the same way as your
original proposal does?
Emard
--- dvb_demux.c.orig 2005-01-04 15:08:45.000000000 +0100
+++ dvb_demux.c 2005-01-04 15:09:19.000000000 +0100
@@ -251,7 +251,7 @@ static void dvb_dmx_swfilter_section_new
/*
** Losless Section Demux 1.4 by Emard
*/
-static int dvb_dmx_swfilter_section_copy_dump(struct dvb_demux_feed *feed, const u8 *buf, u8 len)
+static int dvb_dmx_swfilter_section_copy_dump(struct dvb_demux_feed *feed, const u8 *buf, u8 len, u8 use)
{
struct dvb_demux *demux = feed->demux;
struct dmx_section_feed *sec = &feed->feed.sec;
@@ -295,7 +295,8 @@ static int dvb_dmx_swfilter_section_copy
sec->seclen = seclen;
sec->crc_val = ~0;
/* dump [secbuf .. secbuf+seclen) */
- dvb_dmx_swfilter_section_feed(feed);
+ if(use)
+ dvb_dmx_swfilter_section_feed(feed);
sec->secbufp += seclen; /* secbufp and secbuf moving together is */
sec->secbuf += seclen; /* redundand but saves pointer arithmetic */
}
@@ -342,9 +343,10 @@ static int dvb_dmx_swfilter_section_pack
const u8 *after = before+before_len;
u8 after_len = count-1-before_len;
- dvb_dmx_swfilter_section_copy_dump(feed, before, before_len);
+ dvb_dmx_swfilter_section_copy_dump(feed, before, before_len,
+ feed->feed.sec.tsfeedp > 0 ? 1 : 0);
dvb_dmx_swfilter_section_new(feed);
- dvb_dmx_swfilter_section_copy_dump(feed, after, after_len);
+ dvb_dmx_swfilter_section_copy_dump(feed, after, after_len, 1);
}
#ifdef DVB_DEMUX_SECTION_LOSS_LOG
else
@@ -358,7 +360,8 @@ static int dvb_dmx_swfilter_section_pack
const u8 *entire = buf+p;
u8 entire_len = count;
- dvb_dmx_swfilter_section_copy_dump(feed, entire, entire_len);
+ dvb_dmx_swfilter_section_copy_dump(feed, entire, entire_len,
+ feed->feed.sec.tsfeedp > 0 ? 1 : 0);
}
return 0;
}
Home |
Main Index |
Thread Index