10 byte AdaptationFieldLen;
18 static void CopyPayload(
int PayloadOffset,
int PayloadLen)
24 memcpy(PSBuffer->
pInBufferData, (
void *) &TSBuffer[PayloadOffset], PayloadLen);
26 fo = FileOffset + PayloadOffset;
28 for(i = 0; i < PayloadLen; i++)
43 PID = ((TSBuffer[1] & 0x1f) << 8) | TSBuffer[2];
44 AdaptationFieldLen = 0;
47 if((PID == PSBuffer->
PID) && ((TSBuffer[3] & 0x10) != 0))
53 TAP_Print(
" PS buffer overflow while parsing PID 0x%4.4x", PSBuffer->
PID);
63 TSError = (TSBuffer[1] & 0x80) != 0;
64 Crypted = (TSBuffer[3] & 0xc0) != 0;
67 if(!TSError && !Crypted && !CCError)
69 if((TSBuffer[3] & 0x20) != 0)
71 AdaptationField = TRUE;
72 AdaptationFieldLen = TSBuffer[4];
76 AdaptationField = FALSE;
80 if((TSBuffer[1] & 0x40) != 0)
83 PointerField = TSBuffer[4];
91 CopyPayload(5, PointerField);
110 CopyPayload(5 + PointerField, 183 - PointerField);
114 CopyPayload(5 + AdaptationFieldLen, 183 - AdaptationFieldLen);
125 CopyPayload(5 + AdaptationFieldLen, 183 - AdaptationFieldLen);
bool PSBuffer_ProcessTSPacket(tPSBuffer *PSBuffer, const byte *TSBuffer, ulong64 FileOffset)