summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-09-16 11:45:01 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-16 11:45:01 -0700
commita7f5e476d54e6f7da588909d370580c3e3457e9b (patch)
tree3a59d622680101852e4a84dbdefd7774c1e3b280 /media
parent49e1ae22801f5f9e620552ffd205b05a0d89f65f (diff)
parentdfb89914d47a5df8b9ed7e6326848ea89195d9f3 (diff)
downloadframeworks_base-a7f5e476d54e6f7da588909d370580c3e3457e9b.zip
frameworks_base-a7f5e476d54e6f7da588909d370580c3e3457e9b.tar.gz
frameworks_base-a7f5e476d54e6f7da588909d370580c3e3457e9b.tar.bz2
Merge "Fixed a bug in the query to the supported profiles and levels" into gingerbread
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/OMXCodec.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 3d25a4b..cd70a3d 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -1035,7 +1035,7 @@ status_t OMXCodec::getVideoProfileLevel(
mNode, OMX_IndexParamVideoProfileLevelQuerySupported,
&param, sizeof(param));
- if (err != OK) return err;
+ if (err != OK) break;
int32_t supportedProfile = static_cast<int32_t>(param.eProfile);
int32_t supportedLevel = static_cast<int32_t>(param.eLevel);
@@ -1043,7 +1043,10 @@ status_t OMXCodec::getVideoProfileLevel(
supportedProfile, supportedLevel);
if (profile == supportedProfile &&
- level == supportedLevel) {
+ level <= supportedLevel) {
+ // We can further check whether the level is a valid
+ // value; but we will leave that to the omx encoder component
+ // via OMX_SetParameter call.
profileLevel.mProfile = profile;
profileLevel.mLevel = level;
return OK;