diff options
author | Andreas Huber <andih@google.com> | 2012-10-01 10:43:55 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2012-10-01 10:43:55 -0700 |
commit | 6360758ce2d171169d2a21e30266547ee4ac0fec (patch) | |
tree | 8c04e3dbb48855a7fd18a0ae0d5249be6c7055af /media/libstagefright | |
parent | 087dd8e7232e4c009e9121ab7e8c37985522c9ad (diff) | |
download | frameworks_av-6360758ce2d171169d2a21e30266547ee4ac0fec.zip frameworks_av-6360758ce2d171169d2a21e30266547ee4ac0fec.tar.gz frameworks_av-6360758ce2d171169d2a21e30266547ee4ac0fec.tar.bz2 |
Make sure we still handle shutdown-related message even if we're
in error-state.
Change-Id: Ie12dd1a63306b4020b9de9eae007f6d768f02df6
related-to-bug: 7262673
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/wifi-display/source/PlaybackSession.cpp | 27 |
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; |