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

Commit 90d1d104 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "This code in CameraSource really should hold the lock." into gingerbread

parents 9902196f 22bd2424
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;
            }
        }