dvb_psi: fix the 0x06 estype behaviour, more DVB descriptor defines
This commit is contained in:
parent
fd5a8a498a
commit
6e02f104b7
2 changed files with 41 additions and 2 deletions
|
@ -76,20 +76,51 @@ struct mpegts_mux;
|
|||
|
||||
#define DVB_DESC_NETWORK_NAME 0x40
|
||||
#define DVB_DESC_SERVICE_LIST 0x41
|
||||
#define DVB_DESC_STUFFING 0x42
|
||||
#define DVB_DESC_SAT_DEL 0x43
|
||||
#define DVB_DESC_CABLE_DEL 0x44
|
||||
#define DVB_DESC_VBI_DATA 0x45
|
||||
#define DVB_DESC_VBI_TELETEXT 0x46
|
||||
#define DVB_DESC_BOUQUET_NAME 0x47
|
||||
#define DVB_DESC_SERVICE 0x48
|
||||
#define DVB_DESC_COUNTRY_AVAILABILITY 0x49
|
||||
#define DVB_DESC_LINKAGE 0x4A
|
||||
#define DVB_DESC_NVOD_REFERENCE 0x4B
|
||||
#define DVB_DESC_TIME_SHIFTED_SERVICE 0x4C
|
||||
#define DVB_DESC_SHORT_EVENT 0x4D
|
||||
#define DVB_DESC_EXT_EVENT 0x4E
|
||||
#define DVB_DESC_SERVICE 0x48
|
||||
#define DVB_DESC_TIME_SHIFTED_EVENT 0x4F
|
||||
#define DVB_DESC_COMPONENT 0x50
|
||||
#define DVB_DESC_MOSAIC 0x51
|
||||
#define DVB_DESC_STREAM_ID 0x52
|
||||
#define DVB_DESC_CA_ID 0x53
|
||||
#define DVB_DESC_CONTENT 0x54
|
||||
#define DVB_DESC_PARENTAL_RAT 0x55
|
||||
#define DVB_DESC_TELETEXT 0x56
|
||||
#define DVB_DESC_TELEPHONE 0x57
|
||||
#define DVB_DESC_LOCAL_TIME_OFFSET 0x58
|
||||
#define DVB_DESC_SUBTITLE 0x59
|
||||
#define DVB_DESC_TERR_DEL 0x5A
|
||||
#define DVB_DESC_MULTI_NETWORK_NAME 0x5B
|
||||
#define DVB_DESC_MULTI_BOUQUET_NAME 0x5C
|
||||
#define DVB_DESC_MULTI_SERVICE_NAME 0x5D
|
||||
#define DVB_DESC_MULTI_COMPONENT_NAME 0x5E
|
||||
#define DVB_DESC_PRIVATE_DATA 0x5F
|
||||
#define DVB_DESC_SERVICE_MOVE 0x60
|
||||
#define DVB_DESC_SHORT_SMOOTHING_BUF 0x61
|
||||
#define DVB_DESC_FREQ_LIST 0x62
|
||||
#define DVB_DESC_PARTIAL_TRANSPORT_STREAM 0x63
|
||||
#define DVB_DESC_DATA_BROADCAST 0x64
|
||||
#define DVB_DESC_SCRAMBLING 0x65
|
||||
#define DVB_DESC_DATA_BROADCAST_ID 0x66
|
||||
#define DVB_DESC_TRANSPORT_STREAM 0x67
|
||||
#define DVB_DESC_DSNG 0x68
|
||||
#define DVB_DESC_PDC 0x69
|
||||
#define DVB_DESC_AC3 0x6A
|
||||
#define DVB_DESC_ANCILLARY_DATA 0x6B
|
||||
#define DVB_DESC_CALL_LIST 0x6C
|
||||
#define DVB_DESC_CALL_FREQ_LINK 0x6D
|
||||
#define DVB_DESC_ANNOUNCEMENT_SUPPORT 0x6E
|
||||
#define DVB_DESC_DEF_AUTHORITY 0x73
|
||||
#define DVB_DESC_CRID 0x76
|
||||
#define DVB_DESC_EAC3 0x7A
|
||||
|
|
|
@ -1328,6 +1328,7 @@ psi_parse_pmt
|
|||
dtag = ptr[0];
|
||||
dlen = ptr[1];
|
||||
|
||||
tvhlog_hexdump("pmt", ptr, dlen + 2);
|
||||
len -= 2; ptr += 2; dllen -= 2;
|
||||
if(dlen > len)
|
||||
break;
|
||||
|
@ -1348,6 +1349,7 @@ psi_parse_pmt
|
|||
pid = (ptr[1] & 0x1f) << 8 | ptr[2];
|
||||
dllen = (ptr[3] & 0xf) << 8 | ptr[4];
|
||||
tvhdebug("pmt", " pid %04X estype %d", pid, estype);
|
||||
tvhlog_hexdump("pmt", ptr, 5);
|
||||
|
||||
ptr += 5;
|
||||
len -= 5;
|
||||
|
@ -1372,7 +1374,7 @@ psi_parse_pmt
|
|||
hts_stream_type = SCT_MPEG2AUDIO;
|
||||
break;
|
||||
|
||||
case 0x06: //0x06 is Chinese Cable TV ac3 audio track
|
||||
case 0x06: // 0x06 is Chinese Cable TV AC-3 audio track (see DVB_DESC_REGISTRATION)
|
||||
case 0x81:
|
||||
hts_stream_type = SCT_AC3;
|
||||
break;
|
||||
|
@ -1401,6 +1403,7 @@ psi_parse_pmt
|
|||
dtag = ptr[0];
|
||||
dlen = ptr[1];
|
||||
|
||||
tvhlog_hexdump("pmt", ptr, dlen + 2);
|
||||
len -= 2; ptr += 2; dllen -= 2;
|
||||
if(dlen > len)
|
||||
break;
|
||||
|
@ -1411,9 +1414,14 @@ psi_parse_pmt
|
|||
break;
|
||||
|
||||
case DVB_DESC_REGISTRATION:
|
||||
/* a right format descriptor present? forget the default */
|
||||
if(estype == 0x06)
|
||||
hts_stream_type = SCT_UNKNOWN;
|
||||
if(dlen == 4 &&
|
||||
ptr[0] == 'A' && ptr[1] == 'C' && ptr[2] == '-' && ptr[3] == '3')
|
||||
hts_stream_type = SCT_AC3;
|
||||
/* seen also these formats: */
|
||||
/* LU-A, ADV1 */
|
||||
break;
|
||||
|
||||
case DVB_DESC_LANGUAGE:
|
||||
|
|
Loading…
Add table
Reference in a new issue