The old implementation has undefined behavior in it (unaligned read of uint32_t) Now it's closer to the reference implementation: https://tools.ietf.org/html/rfc6386#section-20.2 Also, added some comments and named some variables to make it more clear, that the parser actually does. Bug: chromium:1057551 Change-Id: I84c1912867e2794502e8a63302c938a0cbab2c4e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169545 Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30661}