Make TS inputs slightly more robust against packet loss
This commit is contained in:
parent
13e04ce608
commit
1ec18d83b8
1 changed files with 5 additions and 5 deletions
|
@ -522,14 +522,14 @@ namespace TS{
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paySize - offset - pesOffset < realPayloadSize){
|
if (paySize - offset - pesOffset < realPayloadSize){
|
||||||
WARN_MSG("Packet loss detected (%" PRIu64 " != %" PRIu64 "), glitches will occur",
|
WARN_MSG("Packet loss detected (%" PRIu64 " != %" PRIu64 "), throwing away data to compensate",
|
||||||
paySize - offset - pesOffset, realPayloadSize);
|
paySize - offset - pesOffset, realPayloadSize);
|
||||||
realPayloadSize = paySize - offset - pesOffset;
|
realPayloadSize = paySize - offset - pesOffset;
|
||||||
}
|
}else{
|
||||||
|
|
||||||
const char *pesPayload = pesHeader + pesOffset;
|
const char *pesPayload = pesHeader + pesOffset;
|
||||||
parseBitstream(tid, pesPayload, realPayloadSize, timeStamp, timeOffset, bPos, pesHeader[6] & 0x04);
|
parseBitstream(tid, pesPayload, realPayloadSize, timeStamp, timeOffset, bPos, pesHeader[6] & 0x04);
|
||||||
lastms[tid] = timeStamp;
|
lastms[tid] = timeStamp;
|
||||||
|
}
|
||||||
|
|
||||||
// Shift the offset by the payload size, the mandatory headers and the optional
|
// Shift the offset by the payload size, the mandatory headers and the optional
|
||||||
// headers/padding
|
// headers/padding
|
||||||
|
|
Loading…
Add table
Reference in a new issue