diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-04-30 05:23:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-04-30 05:23:04 +0000 |
commit | 8d0f95fb94175449fba42addbb54c43e513c0fbe (patch) | |
tree | 7b4a60d8dc29a66a58bbab127c8fa108a3e45d38 /media/eco/ECOSession.cpp | |
parent | a67de76fc920aed26b2351ff4030bd0c6f110514 (diff) | |
parent | d9116453211b4e1fd2be71f90e1147b7eaebebcb (diff) | |
download | av-8d0f95fb94175449fba42addbb54c43e513c0fbe.tar.gz |
Merge "[ECO] Fixes in ECOUtils and ECOSession." into qt-dev
Diffstat (limited to 'media/eco/ECOSession.cpp')
-rw-r--r-- | media/eco/ECOSession.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/eco/ECOSession.cpp b/media/eco/ECOSession.cpp index d86ad5b..61820ae 100644 --- a/media/eco/ECOSession.cpp +++ b/media/eco/ECOSession.cpp @@ -55,7 +55,8 @@ sp<ECOSession> ECOSession::createECOSession(int32_t width, int32_t height, bool // Only support up to 720P and camera recording use case. // TODO(hkuang): Support the same resolution as in EAF. Also relax the isCameraRecording // as encoder may not konw it is from camera for some usage cases. - if (width > 1280 || height > 720 || width == 0 || height == 0 || isCameraRecording == false) { + if (width <= 0 || height <= 0 || width > 5120 || height > 5120 || + width > 1280 * 720 / height || isCameraRecording == false) { ALOGE("Failed to create ECOSession with w: %d, h: %d, isCameraRecording: %d", width, height, isCameraRecording); return nullptr; |