summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/wifi-display/VideoFormats.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2013-05-01 14:13:26 -0700
committerAndreas Huber <andih@google.com>2013-05-01 14:13:26 -0700
commit0182f9acca6f873ee127898e408cf75cc316c3ea (patch)
tree8220c295655cd750632b18177cb243e177b89763 /media/libstagefright/wifi-display/VideoFormats.cpp
parentb7e2ef14a93974935783e71829f4b3174001a0fb (diff)
downloadframeworks_av-0182f9acca6f873ee127898e408cf75cc316c3ea.zip
frameworks_av-0182f9acca6f873ee127898e408cf75cc316c3ea.tar.gz
frameworks_av-0182f9acca6f873ee127898e408cf75cc316c3ea.tar.bz2
Don't even try to verify the native resolution validity a
miracast sink advertises, even if it were valid we couldn't use it since it's not consistently implemented by sinks. Change-Id: Ibee6b3e23b5a55270fc3c419a581e2626530e3af related-to-bug: 8772006
Diffstat (limited to 'media/libstagefright/wifi-display/VideoFormats.cpp')
-rw-r--r--media/libstagefright/wifi-display/VideoFormats.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/media/libstagefright/wifi-display/VideoFormats.cpp b/media/libstagefright/wifi-display/VideoFormats.cpp
index d171c6f..da557f7 100644
--- a/media/libstagefright/wifi-display/VideoFormats.cpp
+++ b/media/libstagefright/wifi-display/VideoFormats.cpp
@@ -249,11 +249,20 @@ bool VideoFormats::parseFormatSpec(const char *spec) {
mNativeIndex = native >> 3;
mNativeType = (ResolutionType)(native & 7);
+ bool success;
if (mNativeType >= kNumResolutionTypes) {
- return false;
+ success = false;
+ } else {
+ success = GetConfiguration(
+ mNativeType, mNativeIndex, NULL, NULL, NULL, NULL);
}
- return GetConfiguration(mNativeType, mNativeIndex, NULL, NULL, NULL, NULL);
+ if (!success) {
+ ALOGW("sink advertised an illegal native resolution, fortunately "
+ "this value is ignored for the time being...");
+ }
+
+ return true;
}
AString VideoFormats::getFormatSpec(bool forM4Message) const {