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

Commit d269313a authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Properly forward rotation information from input format to output format."

parents 0b3c6b19 b5746d90
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -4077,10 +4077,10 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) {
                         numChannels, params.nChannels);
                }

                if (sampleRate != params.nSamplingRate) {
                if (sampleRate != (int32_t)params.nSamplingRate) {
                    LOGW("Codec outputs at different sampling rate than "
                         "what the input stream contains (contains data at "
                         "%d Hz, codec outputs %d Hz)",
                         "%d Hz, codec outputs %lu Hz)",
                         sampleRate, params.nSamplingRate);
                }

@@ -4203,6 +4203,14 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) {
            break;
        }
    }

    // If the input format contains rotation information, flag the output
    // format accordingly.

    int32_t rotationDegrees;
    if (mSource->getFormat()->findInt32(kKeyRotation, &rotationDegrees)) {
        mOutputFormat->setInt32(kKeyRotation, rotationDegrees);
    }
}

status_t OMXCodec::pause() {