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:
@@ -582,6 +582,10 @@ class MediaCodecView extends SurfaceView
|
|||||||
pause();
|
pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mMediaController != null) {
|
||||||
|
mMediaController.setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (mCodecStates != null) {
|
if (mCodecStates != null) {
|
||||||
for (CodecState state : mCodecStates.values()) {
|
for (CodecState state : mCodecStates.values()) {
|
||||||
state.release();
|
state.release();
|
||||||
|
|||||||
Reference in New Issue
Block a user