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

Commit 55f1ce21 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "NuPlayer does not send MEDIA_PLAYBACK_COMPLETE message in some cases."...

Merge "NuPlayer does not send MEDIA_PLAYBACK_COMPLETE message in some cases." am: 21c58e94 am: 61f1361c am: 61edfb9d

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2375228



Change-Id: I6260be14a75327d84dbde22ebdedfcd493a9f780
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 4bc94f04 61edfb9d
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1227,8 +1227,12 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                            notifyListener(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, err);
                        } else {
                            // Only audio track has error. Video track could be still good to play.
                            if (mVideoEOS) {
                                notifyListener(MEDIA_PLAYBACK_COMPLETE, 0, 0);
                            } else {
                                notifyListener(MEDIA_INFO, MEDIA_INFO_PLAY_AUDIO_ERROR, err);
                            }
                        }
                        mAudioDecoderError = true;
                    } else {
                        if (mAudioDecoderError || mSource->getFormat(true /* audio */) == NULL
@@ -1238,8 +1242,12 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                            notifyListener(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, err);
                        } else {
                            // Only video track has error. Audio track could be still good to play.
                            if (mAudioEOS) {
                                notifyListener(MEDIA_PLAYBACK_COMPLETE, 0, 0);
                            } else {
                                notifyListener(MEDIA_INFO, MEDIA_INFO_PLAY_VIDEO_ERROR, err);
                            }
                        }
                        mVideoDecoderError = true;
                    }
                }