eagletmt-recutils icon indicating copy to clipboard operation
eagletmt-recutils copied to clipboard

Add a parser function for Program Clock Reference

Open fujimotos opened this issue 3 years ago • 0 comments

In particular, this fixes the integer overflow bug in the old implementation. Previously we did this:

  pcr_base = uint64_t(p[1]<<25) | (p[2]<<17) | ...

Because of p[1] being not cast prior to the computation, the bit operation ended up causing an integer overflow.

Let's convert each byte into uint64_t explicitly to avoid the above issue.

Signed-off-by: Fujimoto Seiji [email protected]

fujimotos avatar May 19 '22 09:05 fujimotos