Fix stop() in samplePlayer when using MediaCodec mode

When stopping media, getBufferPercentage() and getPosition() may
still be called by MediaController, unless we disable it.

Change-Id: I947fbfb2de724bdcb3121ca9fb204c8bea2a84b2
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 9516405
This commit is contained in:
Lajos Molnar
2013-06-27 13:47:35 -07:00
parent bbf59475e8
commit 39fa902e87

View File

@@ -582,6 +582,10 @@ class MediaCodecView extends SurfaceView
pause();
}
if (mMediaController != null) {
mMediaController.setEnabled(false);
}
if (mCodecStates != null) {
for (CodecState state : mCodecStates.values()) {
state.release();