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

Commit fb806127 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Don't create RefBase on the stack

Test: CTS
Change-Id: I5cb063098babbcbdad6a6656a5c1d1cde8b3201e
parent bf9dba96
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;
                }