google/ExoPlayer — pull request #212 by martinbonnin (2014-12-19 15:39:50+00:00)
Title: Better input format change for non adaptive codecs

better handling of input format change for non-adaptive codecs

* this fixes a bug when switching from HE-AAC 22050Hz to AAC 44100Hz (the AudioTrack was not reset and we were trying to send a bad number of bytes, triggering a "AudioTrack.write() called with invalid size" error)
* this also improves quality switches, making it almost seamless