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

Commit 9e99a1bf authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Don't create RefBase on the stack"

parents ffc04957 fb806127
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -342,15 +342,15 @@ status_t StagefrightMetadataRetriever::getFrameInternal(

    for (size_t i = 0; i < matchingCodecs.size(); ++i) {
        const AString &componentName = matchingCodecs[i];
        VideoFrameDecoder decoder(componentName, trackMeta, source);
        if (decoder.init(timeUs, numFrames, option, colorFormat) == OK) {
        sp<VideoFrameDecoder> decoder = new VideoFrameDecoder(componentName, trackMeta, source);
        if (decoder->init(timeUs, numFrames, option, colorFormat) == OK) {
            if (outFrame != NULL) {
                *outFrame = decoder.extractFrame();
                *outFrame = decoder->extractFrame();
                if (*outFrame != NULL) {
                    return OK;
                }
            } else if (outFrames != NULL) {
                status_t err = decoder.extractFrames(outFrames);
                status_t err = decoder->extractFrames(outFrames);
                if (err == OK) {
                    return OK;
                }