Break if media headers are corrupt. fix #1828