crosswalk-project/crosswalk-android-extensions — pull request #24 by halton (2014-10-17 13:34:05+00:00)
Title: [ARDrone][Video] Read frames of total payload

Old logic of reading payload is buggy, this will cause sometimes get
cracked frame data (wrong frame type and payload size), thus new
operation will fail on allocate too big memory.

Adding readDesiredBytes() will ensure get the wanted byte array, if the
stream get stopped, there will be EOFException throwed. In that case,
the extension should re-establish the connection to the ip:port.