summaryrefslogtreecommitdiffstats
path: root/media/libmedia/mediaplayer.cpp
diff options
context:
space:
mode:
authorRobert Shih <robertshih@google.com>2015-07-22 10:11:51 -0700
committerRobert Shih <robertshih@google.com>2015-07-23 18:03:57 -0700
commit2b95bda111444f2834e64221e3a3eb1a87d43c38 (patch)
tree992e4a4a6cc24d8e17f58b14aa6840009c8fbc9c /media/libmedia/mediaplayer.cpp
parentf8f669d7a727e4ad5505cd85741f4d50dbaffbf9 (diff)
downloadframeworks_av-2b95bda111444f2834e64221e3a3eb1a87d43c38.zip
frameworks_av-2b95bda111444f2834e64221e3a3eb1a87d43c38.tar.gz
frameworks_av-2b95bda111444f2834e64221e3a3eb1a87d43c38.tar.bz2
Explicitly disconnect in MediaPlayer::reset
Even without calling disconnect in MediaPlayer::reset, MediaPlayerService::Client (which lives on the other side of a binder with MediaPlayer) would still perform a disconnect in its destructor. Object destruction across binder is not synchronous, but method calls are. This commit merely makes sure that the disconnect happens deterministically before reset returns. Bug: 22451733 Change-Id: Id9146a63a1872d68087a252aa614248b16d2556d
Diffstat (limited to 'media/libmedia/mediaplayer.cpp')
-rw-r--r--media/libmedia/mediaplayer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index c215abf..502ab2d 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -574,6 +574,7 @@ status_t MediaPlayer::reset_l()
ALOGE("reset() failed with return code (%d)", ret);
mCurrentState = MEDIA_PLAYER_STATE_ERROR;
} else {
+ mPlayer->disconnect();
mCurrentState = MEDIA_PLAYER_IDLE;
}
// setDataSource has to be called again to create a