title: Mpeg2 ts sync byte and continuity error
body: <p>i have a project and i have to write a ts file parser. The parser should read a ts file and output some data from the headers of each packet of the file. Two of the outputs that i have to print are, if there are sync errors(and how many) and the number continuity counter errors.</p>
  
  <p>About the sync error first. I know that the first byte of the packet refers to the sync byte. So, we have a sync error, if the sync byte of the packet doesn't have the 0x47 value as it should? So if there are 100 packets in the file, and 30 sync bytes are "bad" there are 30 sync errors? </p>
  
  <p>About the continuity counter error, i would like someone to explain how to find if there is a continuity error in simple words, as the mpeg2 standard that i read did not help much. 
  Thank you  </p>