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

Commit d9b04af0 authored by c_sridur's avatar c_sridur Committed by Linux Build Service Account
Browse files

StageFright: Fix to handle software decoder crash, during playback.

For s/w video decoding, trying to access "stride" and
"slice-height" parameters without its prior initialization.
As a part of fix, these parameter are set at appropriate
place before its retrieval.

CRS-Fixed : 732893  <http://prism.qualcomm.com/CR/732893>
CRS-Fixed : 736625  <http://prism.qualcomm.com/CR/736625>
CRS-Fixed : 738797  <http://prism.qualcomm.com/CR/738797>
CRS-Fixed : 740944  <http://prism.qualcomm.com/CR/740944>

Change-Id: Ic2f4f9109523a81ed77fa63a942664fd3e791496
parent f4dd4f8b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4931,6 +4931,8 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) {
            mOutputFormat->setInt32(kKeyWidth, video_def->nFrameWidth);
            mOutputFormat->setInt32(kKeyHeight, video_def->nFrameHeight);
            mOutputFormat->setInt32(kKeyColorFormat, video_def->eColorFormat);
            mOutputFormat->setInt32(kKeyStride, video_def->nStride);
            mOutputFormat->setInt32(kKeySliceHeight, video_def->nSliceHeight);

            if (!mIsEncoder) {
                OMX_CONFIG_RECTTYPE rect;
+10 −0
Original line number Diff line number Diff line
@@ -125,6 +125,16 @@ status_t convertMetaDataToMessage(
            msg->setInt32("color-format", colorFormat);
        }

        int32_t stride;
        if (meta->findInt32(kKeyStride, &stride)) {
            msg->setInt32("stride", stride);
        }

        int32_t sliceHeight;
        if (meta->findInt32(kKeySliceHeight, &sliceHeight)) {
            msg->setInt32("slice-height", sliceHeight);
        }

        int32_t cropLeft, cropTop, cropRight, cropBottom;
        if (meta->findRect(kKeyCropRect,
                           &cropLeft,