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

Commit 22bd2424 authored by Andreas Huber's avatar Andreas Huber
Browse files

This code in CameraSource really should hold the lock.

Change-Id: I349520a14776bb83b7edb23fc62052b487246d9a
parent 10ed3f74
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -244,6 +244,7 @@ void CameraSource::releaseOneRecordingFrame(const sp<IMemory>& frame) {

void CameraSource::signalBufferReturned(MediaBuffer *buffer) {
    LOGV("signalBufferReturned: %p", buffer->data());
    Mutex::Autolock autoLock(mLock);
    for (List<sp<IMemory> >::iterator it = mFramesBeingEncoded.begin();
         it != mFramesBeingEncoded.end(); ++it) {
        if ((*it)->pointer() ==  buffer->data()) {
@@ -312,6 +313,7 @@ status_t CameraSource::read(
                (*buffer)->setObserver(this);
                (*buffer)->add_ref();
                (*buffer)->meta_data()->setInt64(kKeyTime, frameTime);

                return OK;
            }
        }