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

Commit 588f93d3 authored by Edwin Wong's avatar Edwin Wong Committed by Android Git Automerger
Browse files

am 6a3969cc: Removed mutex lock in addTextSource, and rename to...

am 6a3969cc: Removed mutex lock in addTextSource, and rename to addTextSource_l to indicate this method needs to be called with a lock hold.

* commit '6a3969cc':
  Removed mutex lock in addTextSource, and rename to addTextSource_l to indicate this method needs to be called with a lock hold.
parents a8f61328 6a3969cc
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -445,7 +445,7 @@ status_t AwesomePlayer::setDataSource_l(const sp<MediaExtractor> &extractor) {
                }
            }
        } else if (!strcasecmp(mime.string(), MEDIA_MIMETYPE_TEXT_3GPP)) {
            addTextSource(i, extractor->getTrack(i));
            addTextSource_l(i, extractor->getTrack(i));
        }
    }

@@ -1347,8 +1347,7 @@ void AwesomePlayer::setAudioSource(sp<MediaSource> source) {
    mAudioTrack = source;
}

void AwesomePlayer::addTextSource(size_t trackIndex, const sp<MediaSource>& source) {
    Mutex::Autolock autoLock(mLock);
void AwesomePlayer::addTextSource_l(size_t trackIndex, const sp<MediaSource>& source) {
    CHECK(source != NULL);

    if (mTextDriver == NULL) {
+1 −1
Original line number Diff line number Diff line
@@ -258,7 +258,7 @@ private:
    void setVideoSource(sp<MediaSource> source);
    status_t initVideoDecoder(uint32_t flags = 0);

    void addTextSource(size_t trackIndex, const sp<MediaSource>& source);
    void addTextSource_l(size_t trackIndex, const sp<MediaSource>& source);

    void onStreamDone();