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

Commit 649e2490 authored by Wei Jia's avatar Wei Jia Committed by android-build-merger
Browse files

Merge "NuPlayer: fix notification when one track is not played." into oc-dev

am: f4b7240b

Change-Id: I243b2e54e5103c44a5d940d37c08eccbc9274245
parents 630ab33e f4b7240b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1160,7 +1160,8 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                }
                if (mSource != nullptr) {
                    if (audio) {
                        if (mVideoDecoderError || mSource->getFormat(false /* audio */) == NULL) {
                        if (mVideoDecoderError || mSource->getFormat(false /* audio */) == NULL
                                || mSurface == NULL) {
                            // When both audio and video have error, or this stream has only audio
                            // which has error, notify client of error.
                            notifyListener(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, err);
@@ -1170,7 +1171,8 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                        }
                        mAudioDecoderError = true;
                    } else {
                        if (mAudioDecoderError || mSource->getFormat(true /* audio */) == NULL) {
                        if (mAudioDecoderError || mSource->getFormat(true /* audio */) == NULL
                                || mAudioSink == NULL) {
                            // When both audio and video have error, or this stream has only video
                            // which has error, notify client of error.
                            notifyListener(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, err);