decoder: h264: slightly optimize the process to detect new pictures.