The way it is currently designed is fundamentally unsafe and cannot be reasonably fixed without completely rewriting it.
a4d34e2 h264: disable ER by default
libavcodec/h264.c | 22 ++++++++++++++++++++++
libavcodec/h264.h | 2 ++
libavcodec/h264_picture.c | 2 +-
libavcodec/h264_slice.c | 6 +++++-
4 files changed, 30 insertions(+), 2 deletions(-)
Upstream: git.libav.org