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

Commit fc8b7c9c authored by James Dong's avatar James Dong
Browse files

Yield the omx threads so that file writer threads have a chance to retrieve...

Yield the omx threads so that file writer threads have a chance to retrieve the output buffers once they become ready

bug - 3252228

Change-Id: Iab7cf1c9a87cce7b814c63b42b21fcd6a7314b36
parent d1e03968
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1734,6 +1734,8 @@ status_t MPEG4Writer::Track::threadEntry() {
    } else {
        prctl(PR_SET_NAME, (unsigned long)"VideoTrackEncoding", 0, 0, 0);
    }
    setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_AUDIO);

    sp<MetaData> meta_data;

    mNumSamples = 0;
+3 −0
Original line number Diff line number Diff line
@@ -2029,6 +2029,9 @@ void OMXCodec::on_message(const omx_message &msg) {

                mFilledBuffers.push_back(i);
                mBufferFilled.signal();
                if (mIsEncoder) {
                    sched_yield();
                }
            }

            break;