tsdemux: hack for PCR extraction now PMT monitoring is disabled

Probably should just force PMT monitoring on for tsfile input and
only extract PCR from "known" good PID. However I've found in
practice the "real" PCR streams are typically video streams that
also include payload. So this hack works for now.
This commit is contained in:
Adam Sutton 2014-04-22 14:04:17 +01:00
parent c361cc6c69
commit 42c54418be

View file

@ -189,7 +189,7 @@ ts_recv_packet1
#endif
/* Extract PCR (do this early for tsfile) */
if(tsb[3] & 0x20 && tsb[4] > 0 && tsb[5] & 0x10 && !error) {
if(((tsb[3] & 0x30) == 0x30) && (tsb[4] > 5) && (tsb[5] & 0x10) && !error) {
pcr = (uint64_t)tsb[6] << 25;
pcr |= (uint64_t)tsb[7] << 17;
pcr |= (uint64_t)tsb[8] << 9;