Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 197f8484 authored by Lajos Molnar's avatar Lajos Molnar Committed by Android Git Automerger
Browse files

am 644afb88: am 9fc2f470: am 8140a2b7: stagefright: report crop rectangle as...

am 644afb88: am 9fc2f470: am 8140a2b7: stagefright: report crop rectangle as codec resolution if exists

* commit '644afb88':
  stagefright: report crop rectangle as codec resolution if exists
parents 65b13a59 644afb88
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -1024,9 +1024,11 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {

                    // Notify mCrypto of video resolution changes
                    if (mCrypto != NULL) {
                      int32_t height, width;
                      if (mOutputFormat->findInt32("height", &height) &&
                          mOutputFormat->findInt32("width", &width)) {
                        int32_t left, top, right, bottom, width, height;
                        if (mOutputFormat->findRect("crop", &left, &top, &right, &bottom)) {
                            mCrypto->notifyResolution(right - left + 1, bottom - top + 1);
                        } else if (mOutputFormat->findInt32("width", &width)
                                && mOutputFormat->findInt32("height", &height)) {
                            mCrypto->notifyResolution(width, height);
                        }
                    }