-fix dont parse current pmt pid

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@863 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2010-10-25 12:10:44 +00:00
parent a1759cbfc8
commit 80f2920d68

View File

@@ -397,7 +397,7 @@ printf("[pmt] name %s\n", description.c_str());
return ES_info_length; return ES_info_length;
} }
int curpmtpid; int curpmtpid,curservice_id;
int pmt_caids[4][11] = {{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0}}; int pmt_caids[4][11] = {{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0}};
int parse_pmt(CZapitChannel * const channel) int parse_pmt(CZapitChannel * const channel)
@@ -455,7 +455,7 @@ int parse_pmt(CZapitChannel * const channel)
delete dmx; delete dmx;
extern cDvbCi *ci; extern cDvbCi *ci;
curservice_id = channel->getServiceId();
curpmtpid = channel->getPmtPid(); curpmtpid = channel->getPmtPid();
pmtlen= ((buffer[1]&0xf)<<8) + buffer[2] +3; pmtlen= ((buffer[1]&0xf)<<8) + buffer[2] +3;
@@ -592,9 +592,9 @@ int parse_pmt(CZapitChannel * const channel)
int scan_parse_pmt(int pmtpid, int service_id ) int scan_parse_pmt(int pmtpid, int service_id )
{ {
if(pmtpid < 1 ) if(pmtpid < 1 ) || (curpmtpid == pmtpid && service_id != curservice_id)
return -1; return -1;
if(curpmtpid == pmtpid ){ if(curpmtpid == pmtpid && service_id == curservice_id){
for(int i=0;i<11;i++){ for(int i=0;i<11;i++){
if(pmt_caids[0][i] > 0) if(pmt_caids[0][i] > 0)
return 1; return 1;
@@ -638,7 +638,7 @@ int scan_parse_pmt(int pmtpid, int service_id )
dpmtlen=0; dpmtlen=0;
pos=10; pos=10;
if(service_id == ((buffer[3] << 8) | buffer[4]) ){
while(pos+2<pmtlen) { while(pos+2<pmtlen) {
dpmtlen=((buffer[pos] & 0x0f) << 8) | buffer[pos+1]; dpmtlen=((buffer[pos] & 0x0f) << 8) | buffer[pos+1];
for ( ia=pos+2;ia<(dpmtlen+pos+2);ia +=descriptor_length+2 ) { for ( ia=pos+2;ia<(dpmtlen+pos+2);ia +=descriptor_length+2 ) {
@@ -664,6 +664,8 @@ int scan_parse_pmt(int pmtpid, int service_id )
pos+=dpmtlen+5; pos+=dpmtlen+5;
} // while } // while
return 0; return 0;
}
return -1;
} }
#ifndef DMX_SET_NEGFILTER_MASK #ifndef DMX_SET_NEGFILTER_MASK