You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing a 100% Javascript MPEG-TS library for Node-JS.
FYI, I was following the patterns in your CRC code and found an issues where in certain cases the CRC values could go negative. This is caused by the way Javascript treats unsigned integers when bit shifting. My altered version of the CRC calculator uses the >>> 0 operator to force treatment as unsigned and that seems to fix the issue. For example:
I am writing a 100% Javascript MPEG-TS library for Node-JS.
FYI, I was following the patterns in your CRC code and found an issues where in certain cases the CRC values could go negative. This is caused by the way Javascript treats unsigned integers when bit shifting. My altered version of the CRC calculator uses the
>>> 0
operator to force treatment as unsigned and that seems to fix the issue. For example:Tested with values generated using http://www.sunshine2k.de/coding/javascript/crc/crc_js.html
The text was updated successfully, but these errors were encountered: