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

Commit 21c58e94 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents f48f625a 2a012640
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1220,8 +1220,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
@@ -1231,8 +1235,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;
                    }
                }