summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice
diff options
context:
space:
mode:
authorFredrik Rosin <fredrik.rosin@sonymobile.com>2013-03-06 13:42:53 +0100
committerHenrik Baard <henrik.baard@sonymobile.com>2013-07-01 13:14:47 +0200
commit0ad03bc59d090a0455f858d2f629834c105f6f37 (patch)
tree86eba1233c510ecc2217ae7d49c1780834d87c6e /media/libmediaplayerservice
parenta9aa6baa5d86fc1a5bd37fc636d766d9e3ad2507 (diff)
downloadframeworks_av-0ad03bc59d090a0455f858d2f629834c105f6f37.zip
frameworks_av-0ad03bc59d090a0455f858d2f629834c105f6f37.tar.gz
frameworks_av-0ad03bc59d090a0455f858d2f629834c105f6f37.tar.bz2
Prevent double disconnects in RTSPSource
Prevent a null pointer from occuring by checking that we are not already disconnected before performing a disconnect, in case multiple disconnects have been issued. Change-Id: Ib88800cd246086fd57f77d10748d41b1aefe2084
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r--media/libmediaplayerservice/nuplayer/RTSPSource.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/nuplayer/RTSPSource.cpp b/media/libmediaplayerservice/nuplayer/RTSPSource.cpp
index cf455bd..f2d5571 100644
--- a/media/libmediaplayerservice/nuplayer/RTSPSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/RTSPSource.cpp
@@ -459,6 +459,10 @@ void NuPlayer::RTSPSource::onConnected() {
}
void NuPlayer::RTSPSource::onDisconnected(const sp<AMessage> &msg) {
+ if (mState == DISCONNECTED) {
+ return;
+ }
+
status_t err;
CHECK(msg->findInt32("result", &err));
CHECK_NE(err, (status_t)OK);