mavlink/qgroundcontrol — pull request #696 by Susurrus (2014-06-10 20:16:17+00:00)
Title: Fix for #647

In the logplayer, the data stream is read ahead for messages, which is used to determine the size of the output bytearrays. Previously, this wasn't done correctly resulting in non-ideal behavior. Now, the next message is scanned properly, so the only bytearrays that are emitted from QGCMAVLinkLogPlayer are MAVLink messages in their entirety. This also has the benefit of skipping invalid/corrupted messages in the log that's being played back.

This does, however, result in double-scanning the log file for every cluster of messages that we process (where one cluster is processed per call to `logLoop()`). Since we are only playing back data, we are likely running this on a fast-enough computer in a safe environment, so performance and power usage should be less than an issue than when actually controlling a UAS.

Fixes #647