[Live-devel] MPEG2TransportStreamIndexer problem

Nadir Raimondo raimondo at ismb.it
Wed Jun 18 07:57:18 PDT 2014


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140618/3f9b4b1e/attachment-0001.html>


More information about the live-devel mailing list