Skip to content

Commit b8382df

Browse files
committed
Correcting the PID range allowed for PMT and other table parsing
1 parent a7d2800 commit b8382df

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ test/data/*
44
bin/*
55
*.o
66
coverage/*
7+
**/*.ts

src/tsdemux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,8 +1484,8 @@ size_t tsd_demux(TSDemuxContext *ctx,
14841484
if(res != TSD_OK && res != TSD_INCOMPLETE_TABLE) {
14851485
return res;
14861486
}
1487-
} else if (hdr.pid > TSD_PID_RESERVED_NON_ATSC &&
1488-
hdr.pid <= TSD_PID_GENERAL_PURPOSE) {
1487+
} else if (hdr.pid >= TSD_PID_DATA_TABLES_START &&
1488+
hdr.pid <= TSD_PID_RESERVED_FUTURE) {
14891489
// check to see if this PID is a PMT
14901490
int parsed = 0;
14911491
if(ctx->pat.valid) {

src/tsdemux.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ typedef enum TSDPIDValue {
154154
TSD_PID_SDT = 0x0011,
155155
/** DVB Service Information **/
156156
TSD_PID_RESERVED_DVB_SI = 0x001F,
157+
/** PIDs from this PID can be assigned to Program Map Tables, Elementary Streams
158+
* or other data tables **/
159+
TSD_PID_DATA_TABLES_START = 0x0020,
157160
/** ARIB Service Information **/
158161
TSD_PID_RESERVED_ARIB_SI = 0x002F,
159162
/** Set aside for non ATSC Use **/

0 commit comments

Comments
 (0)