mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed some out of bounds parameter settings when scanning NITs for cable and satellite transponders
This commit is contained in:
parent
043fe49ff8
commit
dac9932ef0
2
HISTORY
2
HISTORY
@ -2602,3 +2602,5 @@ Video Disk Recorder Revision History
|
|||||||
- Excess blanks in channel names read from the SDT are now removed.
|
- Excess blanks in channel names read from the SDT are now removed.
|
||||||
- Fixed wrong parameter settings when scanning NITs for terrestrial transponders
|
- Fixed wrong parameter settings when scanning NITs for terrestrial transponders
|
||||||
(thanks to Christian Tramnitz for pointing out this one).
|
(thanks to Christian Tramnitz for pointing out this one).
|
||||||
|
- Fixed some out of bounds parameter settings when scanning NITs for cable
|
||||||
|
and satellite transponders.
|
||||||
|
10
nit.c
10
nit.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: nit.c 1.2 2004/01/18 09:49:55 kls Exp $
|
* $Id: nit.c 1.3 2004/01/18 10:09:47 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "nit.h"
|
#include "nit.h"
|
||||||
@ -46,7 +46,7 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
int Frequency = BCD2INT(sd->getFrequency()) / 100;
|
int Frequency = BCD2INT(sd->getFrequency()) / 100;
|
||||||
static char Polarizations[] = { 'h', 'v', 'l', 'r' };
|
static char Polarizations[] = { 'h', 'v', 'l', 'r' };
|
||||||
char Polarization = Polarizations[sd->getPolarization()];
|
char Polarization = Polarizations[sd->getPolarization()];
|
||||||
static int CodeRates[] = { FEC_NONE, FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE };
|
static int CodeRates[] = { FEC_NONE, FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_NONE };
|
||||||
int CodeRate = CodeRates[sd->getFecInner()];
|
int CodeRate = CodeRates[sd->getFecInner()];
|
||||||
int SymbolRate = BCD2INT(sd->getSymbolRate()) / 10;
|
int SymbolRate = BCD2INT(sd->getSymbolRate()) / 10;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@ -72,10 +72,10 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
int Source = cSource::FromData(cSource::stCable);
|
int Source = cSource::FromData(cSource::stCable);
|
||||||
int Frequency = BCD2INT(sd->getFrequency()) / 10;
|
int Frequency = BCD2INT(sd->getFrequency()) / 10;
|
||||||
//XXX FEC_outer???
|
//XXX FEC_outer???
|
||||||
static int CodeRates[] = { FEC_NONE, FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE, FEC_NONE };
|
static int CodeRates[] = { FEC_NONE, FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_NONE };
|
||||||
int CodeRate = CodeRates[sd->getFecInner()];
|
int CodeRate = CodeRates[sd->getFecInner()];
|
||||||
static int Modulations[] = { QPSK, QAM_16, QAM_32, QAM_64, QAM_128, QAM_256 };
|
static int Modulations[] = { QPSK, QAM_16, QAM_32, QAM_64, QAM_128, QAM_256, QAM_AUTO };
|
||||||
int Modulation = Modulations[sd->getModulation()];
|
int Modulation = Modulations[min(sd->getModulation(), 6)];
|
||||||
int SymbolRate = BCD2INT(sd->getSymbolRate()) / 10;
|
int SymbolRate = BCD2INT(sd->getSymbolRate()) / 10;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
|
for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user