summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/wifi-display
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2014-02-07 09:32:44 -0800
committerChong Zhang <chz@google.com>2014-02-07 12:58:29 -0800
commit456fa912e46edf0b01ea3b7760ea922c01ca1866 (patch)
tree7997373321e52e748baa5d273b2adc39bc6f4ba0 /media/libstagefright/wifi-display
parent7ca6e73bed1d2e1a928104feb6e9ae92953bfff5 (diff)
downloadframeworks_av-456fa912e46edf0b01ea3b7760ea922c01ca1866.zip
frameworks_av-456fa912e46edf0b01ea3b7760ea922c01ca1866.tar.gz
frameworks_av-456fa912e46edf0b01ea3b7760ea922c01ca1866.tar.bz2
fix delay when shutting down wifi display
RepeaterSource needs to stop SurfaceMediaSource before stopping its looper, otherwise the stop could get queued behind the last read(), which will not return until a new frame comes. Change SurfaceMediaSource stop to signal frame avalable first, so that its read() returns EOS to reader upon stop. Bug: 11677087 Change-Id: Ie331cc8c7f4824fd3930f3e909b53db4463902fb
Diffstat (limited to 'media/libstagefright/wifi-display')
-rw-r--r--media/libstagefright/wifi-display/source/RepeaterSource.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/wifi-display/source/RepeaterSource.cpp b/media/libstagefright/wifi-display/source/RepeaterSource.cpp
index cc8dee3..59d7e6e 100644
--- a/media/libstagefright/wifi-display/source/RepeaterSource.cpp
+++ b/media/libstagefright/wifi-display/source/RepeaterSource.cpp
@@ -79,6 +79,8 @@ status_t RepeaterSource::stop() {
ALOGV("stopping");
+ status_t err = mSource->stop();
+
if (mLooper != NULL) {
mLooper->stop();
mLooper.clear();
@@ -92,7 +94,6 @@ status_t RepeaterSource::stop() {
mBuffer = NULL;
}
- status_t err = mSource->stop();
ALOGV("stopped");