提交 fed488b3 编写于 作者: M Mauro Carvalho Chehab 提交者: Mauro Carvalho Chehab

media: dvb_demux: Better handle discontinuity errors

When a packet discontinuity happens, it is not just the payload
that was lost. The headers are lost too. So, the max size is not
184 but, instead 188.

Also, while printing warnings, make a distinction between
MPEG-TS indicated discontinuity and detected one.
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 9893b905
...@@ -310,8 +310,9 @@ static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, ...@@ -310,8 +310,9 @@ static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed,
if (!ccok || dc_i) { if (!ccok || dc_i) {
#ifdef CONFIG_DVB_DEMUX_SECTION_LOSS_LOG #ifdef CONFIG_DVB_DEMUX_SECTION_LOSS_LOG
dprintk("dvb_demux.c discontinuity detected %d bytes lost\n", dprintk("discontinuity %s: %d bytes lost\n",
count); !ccok ? "detected" : "indicated",
count + 4);
/* /*
* those bytes under sume circumstances will again be reported * those bytes under sume circumstances will again be reported
* in the following dvb_dmx_swfilter_section_new * in the following dvb_dmx_swfilter_section_new
...@@ -320,6 +321,9 @@ static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, ...@@ -320,6 +321,9 @@ static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed,
/* /*
* Discontinuity detected. Reset pusi_seen 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
*
* FIXME: does it make sense if the MPEG-TS is the one
* reporting discontinuity?
*/ */
feed->pusi_seen = false; feed->pusi_seen = false;
dvb_dmx_swfilter_section_new(feed); dvb_dmx_swfilter_section_new(feed);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册