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

Commit c2a1fdd0 authored by Chong Zhang's avatar Chong Zhang Committed by Android (Google) Code Review
Browse files

Merge "fix crash due to no output format available"

parents b4e7ed52 226c9b91
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -419,8 +419,11 @@ status_t VideoFrameDecoder::onOutputReceived(

    *done = (++mNumFramesDecoded >= mNumFrames);

    if (outputFormat == NULL) {
        return ERROR_MALFORMED;
    }

    int32_t width, height;
    CHECK(outputFormat != NULL);
    CHECK(outputFormat->findInt32("width", &width));
    CHECK(outputFormat->findInt32("height", &height));

@@ -540,8 +543,11 @@ sp<AMessage> ImageDecoder::onGetFormatAndSeekOptions(
status_t ImageDecoder::onOutputReceived(
        const sp<MediaCodecBuffer> &videoFrameBuffer,
        const sp<AMessage> &outputFormat, int64_t /*timeUs*/, bool *done) {
    if (outputFormat == NULL) {
        return ERROR_MALFORMED;
    }

    int32_t width, height;
    CHECK(outputFormat != NULL);
    CHECK(outputFormat->findInt32("width", &width));
    CHECK(outputFormat->findInt32("height", &height));