am a7f5e476: Merge "Fixed a bug in the query to the supported profiles and levels" into gingerbread
Merge commit 'a7f5e476d54e6f7da588909d370580c3e3457e9b' into gingerbread-plus-aosp * commit 'a7f5e476d54e6f7da588909d370580c3e3457e9b': Fixed a bug in the query to the supported profiles and levels
This commit is contained in:
@@ -1035,7 +1035,7 @@ status_t OMXCodec::getVideoProfileLevel(
|
|||||||
mNode, OMX_IndexParamVideoProfileLevelQuerySupported,
|
mNode, OMX_IndexParamVideoProfileLevelQuerySupported,
|
||||||
¶m, sizeof(param));
|
¶m, sizeof(param));
|
||||||
|
|
||||||
if (err != OK) return err;
|
if (err != OK) break;
|
||||||
|
|
||||||
int32_t supportedProfile = static_cast<int32_t>(param.eProfile);
|
int32_t supportedProfile = static_cast<int32_t>(param.eProfile);
|
||||||
int32_t supportedLevel = static_cast<int32_t>(param.eLevel);
|
int32_t supportedLevel = static_cast<int32_t>(param.eLevel);
|
||||||
@@ -1043,7 +1043,10 @@ status_t OMXCodec::getVideoProfileLevel(
|
|||||||
supportedProfile, supportedLevel);
|
supportedProfile, supportedLevel);
|
||||||
|
|
||||||
if (profile == supportedProfile &&
|
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.mProfile = profile;
|
||||||
profileLevel.mLevel = level;
|
profileLevel.mLevel = level;
|
||||||
return OK;
|
return OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user