Current dvb_demux_tscheck processing doesn't allow to enable check on loaded
module. dvb_demux_tscheck can be enabled only when loading module (
dvb_dmx_init should be called to enable dvb_demux_tscheck ). This patch fix
this issue.

Signed-off-by: Abylay Ospan <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/dvb/dvb-core/dvb_demux.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

---

http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=2dfbaca5d9d30ad330351c715193c6e8407908a5
diff --git a/drivers/media/dvb/dvb-core/dvb_demux.c 
b/drivers/media/dvb/dvb-core/dvb_demux.c
index 67f189b..977ddba 100644
--- a/drivers/media/dvb/dvb-core/dvb_demux.c
+++ b/drivers/media/dvb/dvb-core/dvb_demux.c
@@ -426,7 +426,7 @@ static void dvb_dmx_swfilter_packet(struct dvb_demux 
*demux, const u8 *buf)
                };
        };
 
-       if (demux->cnt_storage) {
+       if (demux->cnt_storage && dvb_demux_tscheck) {
                /* check pkt counter */
                if (pid < MAX_PID) {
                        if (buf[1] & 0x80)
@@ -1248,12 +1248,9 @@ 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");
-       }
+       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);
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to