<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<pre wrap="">Dear all,
I've a question about transport stream indexing with MPEG2TransportStreamIndexer (for media server trick play).
It generates a lot of errors: Bad "adaptation_field_length": 183
Those errors are generated by MPEG2IndexFromTransportStream liveMedia class. Here the code:
if (totalHeaderSize >= TRANSPORT_PACKET_SIZE) {
envir() << "Bad \"adaptation_field_length\": " << fInputBuffer[4] << "\n";
doGetNextFrame();
return;
}
When "adaptation_field_control" field value = 2 (that it means "adaptation field only") the totalHeaderSize is equals to 188 byte.
E.g.
packet header = 4 byte
adaptation_field_length field = 1 byte (value = 183)
adaptation field = 183 byte
The result = 4 + 1 + 183 = 188. This is the correct value but it generates an error.
Should the check be "if (totalHeaderSize > TRANSPORT_PACKET_SIZE)"?
Cheers,
Nadir</pre>
<small></small>
</body>
</html>