Revert "Merge commit '3c53627ac17fc6bdea5029be57da1e03b32d265d'"

This reverts commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e, reversing changes made to
acc155ac55baa95d1c16c0364b02244bc04d83a8. The commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e
provided irrelevant code complexity and decoding slowdown. But the main disadvantage of this
commit is a decoder crash. So it should be reverted.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
