summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/libstagefright/AwesomePlayer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 0749254..d7f721f 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -2120,7 +2120,13 @@ status_t AwesomePlayer::finishSetDataSource_l() {
String8 mimeType;
float confidence;
sp<AMessage> dummy;
- bool success = SniffWVM(dataSource, &mimeType, &confidence, &dummy);
+ bool success;
+
+ // SniffWVM is potentially blocking since it may require network access.
+ // Do not call it with mLock held.
+ mLock.unlock();
+ success = SniffWVM(dataSource, &mimeType, &confidence, &dummy);
+ mLock.lock();
if (!success
|| strcasecmp(