summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MediaCodecList.cpp
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-04-28 19:02:33 -0700
committerAndy Hung <hunga@google.com>2015-04-29 14:10:12 -0700
commit48a31bf3f1c1ed5953a4e64f71cdf528f3a38ee5 (patch)
tree1227f65215a97e0c73a453bb0ffb09ff636ad432 /media/libstagefright/MediaCodecList.cpp
parent1e2a0e6adc3d70879b00e5295c54a74209b71e1b (diff)
downloadframeworks_av-48a31bf3f1c1ed5953a4e64f71cdf528f3a38ee5.zip
frameworks_av-48a31bf3f1c1ed5953a4e64f71cdf528f3a38ee5.tar.gz
frameworks_av-48a31bf3f1c1ed5953a4e64f71cdf528f3a38ee5.tar.bz2
Omx: Return an error if no IOMX is available
Previously caused fatal crash. Bug: 20566134 Change-Id: I9761d043422954615dbe81b301401765146a7283
Diffstat (limited to 'media/libstagefright/MediaCodecList.cpp')
-rw-r--r--media/libstagefright/MediaCodecList.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/media/libstagefright/MediaCodecList.cpp b/media/libstagefright/MediaCodecList.cpp
index 26798ae..97640a8 100644
--- a/media/libstagefright/MediaCodecList.cpp
+++ b/media/libstagefright/MediaCodecList.cpp
@@ -80,6 +80,10 @@ sp<IMediaCodecList> MediaCodecList::getLocalInstance() {
infos.push_back(gCodecList->getCodecInfo(i));
}
}
+ } else {
+ // failure to initialize may be temporary. retry on next call.
+ delete gCodecList;
+ gCodecList = NULL;
}
}
}
@@ -168,7 +172,7 @@ void MediaCodecList::parseTopLevelXMLFile(const char *codecs_xml, bool ignore_er
OMXClient client;
mInitCheck = client.connect();
if (mInitCheck != OK) {
- return;
+ return; // this may fail if IMediaPlayerService is not available.
}
mOMX = client.interface();
parseXMLFile(codecs_xml);