title: Calculate OPUS packet length
body: <p>I have a simple application where I send OPUS packets from one client to other say A to B.</p>
  
  <p>A reads one packet from a OPUS file, and send to B.
  Again after 20ms or 30ms reads one more packet and send to B, so on..
  Till now I was using RTP over UDP, so on receiving side at B, when I receive the packet, I receive complete packet. After receiving complete packet I write to a new file.</p>
  
  <p>This works fine.</p>
  
  <p>Now I am planning to support RTP over TCP.
  A will read a complete packet from OPUS file and send to B.
  When packet is received at B, it may be received as a single packet or multiple packet (tcp behaviour). My requirement is, I should buffer the data till I receive complete packet. Once I receive complete packet, I will write it to a file.</p>
  
  <p>Now my question is, how do I determine the length of OPUS packet at B while I receiving, so that I can buffer it.</p>
  
  <p>Do not want to use libopus etc if somehow I can avoid it. If by any means from received data, can I find out length of packet?</p>