eagletmt-recutils
eagletmt-recutils copied to clipboard
Add a parser function for Program Clock Reference
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]