Fixed incorrect RBSP parsing. The original version would eat 0x3 as an emulation byte in places where it shouldn't, whereas the real parsing is only supposed to eat 0x3 preceded by 0x0 0x0.

Also, now that BitBuffer is getting a writer (https://webrtc-codereview.appspot.com/45259005/), I wrote a function that creates a fake SPS of a given resolution. The created SPS has an emulation 0x3 and a real 0x3, so it ensures the parser has the correct behavior.

BUG=
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/44349004

Cr-Commit-Position: refs/heads/master@{#9108}
2 files changed