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

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

Merge "Serialize calls to getFrameAtTime in the mediaserver" into mnc-dev

parents f8f2f137 6155085b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -191,10 +191,13 @@ status_t MetadataRetrieverClient::setDataSource(
    return ret;
}

Mutex MetadataRetrieverClient::sLock;

sp<IMemory> MetadataRetrieverClient::getFrameAtTime(int64_t timeUs, int option)
{
    ALOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option);
    Mutex::Autolock lock(mLock);
    Mutex::Autolock glock(sLock);
    mThumbnail.clear();
    if (mRetriever == NULL) {
        ALOGE("retriever is not initialized");
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ private:
    virtual ~MetadataRetrieverClient();

    mutable Mutex                          mLock;
    static  Mutex                          sLock;
    sp<MediaMetadataRetrieverBase>         mRetriever;
    pid_t                                  mPid;