in your code , urb payload length from transfer->TransferBufferLength
but , sometimes , the actual payload length is bigger then that value.
I think get actual payload length should like the follow, or some other way.
int i= transfer->NumberOfPackets-1;
size_t actual_datalength = transfer->IsoPacket[i].Offset+ transfer->IsoPacket[i].Length;
you can find the data in my pcap file .
new_zl.zip
your code in USBPcapURB.c like the follow:
you can find the data in my pcap file . new_zl.zip