summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2014-09-15 23:37:50 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-15 23:37:51 +0000
commit73721170e1a3c9751ef00fd53b6b5eec5f2c5c81 (patch)
tree131795898a7160b594bb60194680d0e0b5e39327 /media
parent47e89d7dcb4406b197c13764897fb28ac1e0b09b (diff)
parent14986f6cca08b9ab0407cc2d31f92bfb02b5cb8c (diff)
downloadframeworks_av-73721170e1a3c9751ef00fd53b6b5eec5f2c5c81.zip
frameworks_av-73721170e1a3c9751ef00fd53b6b5eec5f2c5c81.tar.gz
frameworks_av-73721170e1a3c9751ef00fd53b6b5eec5f2c5c81.tar.bz2
Merge "mediaplayer: handle surface dis/connection errors" into lmp-dev
Diffstat (limited to 'media')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
index 163a0b5..87f85e7 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
@@ -122,14 +122,17 @@ void NuPlayer::Decoder::onConfigure(const sp<AMessage> &format) {
mCodec->getName(&mComponentName);
+ status_t err;
if (mNativeWindow != NULL) {
// disconnect from surface as MediaCodec will reconnect
- CHECK_EQ((int)NO_ERROR,
- native_window_api_disconnect(
- surface.get(),
- NATIVE_WINDOW_API_MEDIA));
+ err = native_window_api_disconnect(
+ surface.get(), NATIVE_WINDOW_API_MEDIA);
+ // We treat this as a warning, as this is a preparatory step.
+ // Codec will try to connect to the surface, which is where
+ // any error signaling will occur.
+ ALOGW_IF(err != OK, "failed to disconnect from surface: %d", err);
}
- status_t err = mCodec->configure(
+ err = mCodec->configure(
format, surface, NULL /* crypto */, 0 /* flags */);
if (err != OK) {
ALOGE("Failed to configure %s decoder (err=%d)", mComponentName.c_str(), err);