media: dvb_demux: dvb_demux_feed.pusi_seen is boolean
Instead of using an integer to represent it, use boolean, as this better describes what this field really means. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
@@ -223,10 +223,10 @@ static void dvb_dmx_swfilter_section_new(struct dvb_demux_feed *feed)
|
|||||||
* when the second packet arrives.
|
* when the second packet arrives.
|
||||||
*
|
*
|
||||||
* Fix:
|
* Fix:
|
||||||
* when demux is started, let feed->pusi_seen = 0 to
|
* when demux is started, let feed->pusi_seen = false to
|
||||||
* prevent initial feeding of garbage from the end of
|
* prevent initial feeding of garbage from the end of
|
||||||
* previous section. When you for the first time see PUSI=1
|
* previous section. When you for the first time see PUSI=1
|
||||||
* then set feed->pusi_seen = 1
|
* then set feed->pusi_seen = true
|
||||||
*/
|
*/
|
||||||
static int dvb_dmx_swfilter_section_copy_dump(struct dvb_demux_feed *feed,
|
static int dvb_dmx_swfilter_section_copy_dump(struct dvb_demux_feed *feed,
|
||||||
const u8 *buf, u8 len)
|
const u8 *buf, u8 len)
|
||||||
@@ -318,10 +318,10 @@ static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed,
|
|||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* Discontinuity detected. Reset pusi_seen = 0 to
|
* Discontinuity detected. Reset pusi_seen to
|
||||||
* stop feeding of suspicious data until next PUSI=1 arrives
|
* stop feeding of suspicious data until next PUSI=1 arrives
|
||||||
*/
|
*/
|
||||||
feed->pusi_seen = 0;
|
feed->pusi_seen = false;
|
||||||
dvb_dmx_swfilter_section_new(feed);
|
dvb_dmx_swfilter_section_new(feed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,8 +335,8 @@ static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed,
|
|||||||
|
|
||||||
dvb_dmx_swfilter_section_copy_dump(feed, before,
|
dvb_dmx_swfilter_section_copy_dump(feed, before,
|
||||||
before_len);
|
before_len);
|
||||||
/* before start of new section, set pusi_seen = 1 */
|
/* before start of new section, set pusi_seen */
|
||||||
feed->pusi_seen = 1;
|
feed->pusi_seen = true;
|
||||||
dvb_dmx_swfilter_section_new(feed);
|
dvb_dmx_swfilter_section_new(feed);
|
||||||
dvb_dmx_swfilter_section_copy_dump(feed, after,
|
dvb_dmx_swfilter_section_copy_dump(feed, after,
|
||||||
after_len);
|
after_len);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ struct dvb_demux_feed {
|
|||||||
enum dmx_ts_pes pes_type;
|
enum dmx_ts_pes pes_type;
|
||||||
|
|
||||||
int cc;
|
int cc;
|
||||||
int pusi_seen; /* prevents feeding of garbage from previous section */
|
bool pusi_seen; /* prevents feeding of garbage from previous section */
|
||||||
|
|
||||||
u16 peslen;
|
u16 peslen;
|
||||||
|
|
||||||
|
|||||||
@@ -1224,7 +1224,7 @@ static int budget_start_feed(struct dvb_demux_feed *feed)
|
|||||||
dprintk(2, "av7110: %p\n", budget);
|
dprintk(2, "av7110: %p\n", budget);
|
||||||
|
|
||||||
spin_lock(&budget->feedlock1);
|
spin_lock(&budget->feedlock1);
|
||||||
feed->pusi_seen = 0; /* have a clean section start */
|
feed->pusi_seen = false; /* have a clean section start */
|
||||||
status = start_ts_capture(budget);
|
status = start_ts_capture(budget);
|
||||||
spin_unlock(&budget->feedlock1);
|
spin_unlock(&budget->feedlock1);
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ static int budget_start_feed(struct dvb_demux_feed *feed)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
spin_lock(&budget->feedlock);
|
spin_lock(&budget->feedlock);
|
||||||
feed->pusi_seen = 0; /* have a clean section start */
|
feed->pusi_seen = false; /* have a clean section start */
|
||||||
if (budget->feeding++ == 0)
|
if (budget->feeding++ == 0)
|
||||||
status = start_ts_capture(budget);
|
status = start_ts_capture(budget);
|
||||||
spin_unlock(&budget->feedlock);
|
spin_unlock(&budget->feedlock);
|
||||||
|
|||||||
Reference in New Issue
Block a user