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

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

Don't pass references to temporary objects, and handle the case where we dont have a Surface.

parent 8e1b6cce
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -233,7 +233,10 @@ status_t MediaPlayer::setVideoSurface(const sp<Surface>& surface)
    LOGV("setVideoSurface");
    Mutex::Autolock _l(mLock);
    if (mPlayer == 0) return NO_INIT;
    if (surface != NULL)
        return  mPlayer->setVideoSurface(surface->getISurface());
    else
        return  mPlayer->setVideoSurface(NULL);
}

// must call with lock held