capmt.cpp: enable CI for recording only if necessary

Origin commit data
------------------
Commit: 609748c921
Author: FlatTV <FlatTV@gmx.de>
Date: 2019-03-24 (Sun, 24 Mar 2019)
This commit is contained in:
FlatTV
2019-03-24 18:50:38 +01:00
parent 050ab067e4
commit b188ea28d2

View File

@@ -325,7 +325,13 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start
cam->makeCaPmt(channel, false, list, caids);
int len;
unsigned char * buffer = channel->getRawPmt(len);
cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI, channel->scrambled, channel->camap, mode, start);
if(!filter_channels || !channel->bUseCI) {
//no CI needed
ca_map_t no_camap = std::set<int>();
cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI, false /*channel->scrambled*/, no_camap /*channel->camap*/, mode, start);
} else {
cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI, channel->scrambled, channel->camap, mode, start);
}
} else {
cam->sendCaPmt(channel->getChannelID(), NULL, 0, CA_SLOT_TYPE_CI, channel->scrambled, channel->camap, mode, start);
}