h264: reimplement 3aa661ec5 in a more explicit way