summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-10-01 10:43:55 -0700
committerThe Android Automerger <android-build@android.com>2012-10-01 16:26:08 -0700
commit7352fca8d879f0d65807ed03221bf5c4fd4027b6 (patch)
tree8c04e3dbb48855a7fd18a0ae0d5249be6c7055af
parent458923c1225977d8c5b596deffcb70fcabe9b139 (diff)
downloadframeworks_av-7352fca8d879f0d65807ed03221bf5c4fd4027b6.zip
frameworks_av-7352fca8d879f0d65807ed03221bf5c4fd4027b6.tar.gz
frameworks_av-7352fca8d879f0d65807ed03221bf5c4fd4027b6.tar.bz2
Make sure we still handle shutdown-related message even if we're
in error-state. Change-Id: Ie12dd1a63306b4020b9de9eae007f6d768f02df6 related-to-bug: 7262673
-rw-r--r--media/libstagefright/wifi-display/source/PlaybackSession.cpp27
1 files changed, 7 insertions, 20 deletions
diff --git a/media/libstagefright/wifi-display/source/PlaybackSession.cpp b/media/libstagefright/wifi-display/source/PlaybackSession.cpp
index 829a16d..c8b9afd 100644
--- a/media/libstagefright/wifi-display/source/PlaybackSession.cpp
+++ b/media/libstagefright/wifi-display/source/PlaybackSession.cpp
@@ -526,10 +526,6 @@ void WifiDisplaySource::PlaybackSession::destroyAsync() {
void WifiDisplaySource::PlaybackSession::onMessageReceived(
const sp<AMessage> &msg) {
- if (mWeAreDead) {
- return;
- }
-
switch (msg->what()) {
case kWhatRTPNotify:
case kWhatRTCPNotify:
@@ -661,6 +657,13 @@ void WifiDisplaySource::PlaybackSession::onMessageReceived(
case kWhatConverterNotify:
{
+ if (mWeAreDead) {
+ ALOGV("dropping msg '%s' because we're dead",
+ msg->debugString().c_str());
+
+ break;
+ }
+
int32_t what;
CHECK(msg->findInt32("what", &what));
@@ -1322,10 +1325,6 @@ bool WifiDisplaySource::PlaybackSession::allTracksHavePacketizerIndex() {
return true;
}
-static inline size_t MIN(size_t a, size_t b) {
- return (a < b) ? a : b;
-}
-
status_t WifiDisplaySource::PlaybackSession::packetizeAccessUnit(
size_t trackIndex, sp<ABuffer> accessUnit) {
const sp<Track> &track = mTracks.valueFor(trackIndex);
@@ -1338,11 +1337,6 @@ status_t WifiDisplaySource::PlaybackSession::packetizeAccessUnit(
if (mHDCP != NULL && !track->isAudio()) {
isHDCPEncrypted = true;
-#if 0
- ALOGI("in:");
- hexdump(accessUnit->data(), MIN(64, accessUnit->size()));
-#endif
-
if (IsIDR(accessUnit)) {
// XXX remove this once the encoder takes care of this.
accessUnit = mPacketizer->prependCSD(
@@ -1360,13 +1354,6 @@ status_t WifiDisplaySource::PlaybackSession::packetizeAccessUnit(
err);
return err;
- } else {
-#if 0
- ALOGI("out:");
- hexdump(accessUnit->data(), MIN(64, accessUnit->size()));
- ALOGI("inputCTR: 0x%016llx", inputCTR);
- ALOGI("streamCTR: 0x%08x", trackIndex);
-#endif
}
HDCP_private_data[0] = 0x00;