diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp index c0de97a3f93..1705794bb76 100644 --- a/mythtv/libs/libmythtv/mythplayer.cpp +++ b/mythtv/libs/libmythtv/mythplayer.cpp @@ -3312,10 +3312,8 @@ bool MythPlayer::IsReallyNearEnd(void) const } /** \brief Returns true iff near end of recording. - * \param margin minimum number of frames we want before being near end, - * defaults to 2 seconds of video. */ -bool MythPlayer::IsNearEnd(int64_t margin) +bool MythPlayer::IsNearEnd(void) { uint64_t framesRead, framesLeft = 0; @@ -3331,7 +3329,7 @@ bool MythPlayer::IsNearEnd(int64_t margin) } player_ctx->UnlockPlayingInfo(__FILE__, __LINE__); - margin = (margin >= 0) ? margin: (long long) (video_frame_rate*2); + long long margin = (long long)(video_frame_rate * 2); margin = (long long) (margin * audio.GetStretchFactor()); bool watchingTV = watchingrecording && player_ctx->recorder && player_ctx->recorder->IsValidRecorder(); diff --git a/mythtv/libs/libmythtv/mythplayer.h b/mythtv/libs/libmythtv/mythplayer.h index b77629694ad..3229f4adb8d 100644 --- a/mythtv/libs/libmythtv/mythplayer.h +++ b/mythtv/libs/libmythtv/mythplayer.h @@ -194,7 +194,7 @@ class MPUBLIC MythPlayer bool IsPlaying(uint wait_ms = 0, bool wait_for = true) const; bool AtNormalSpeed(void) const { return next_normal_speed; } bool IsReallyNearEnd(void) const; - bool IsNearEnd(int64_t framesRemaining = -1); + bool IsNearEnd(void); bool HasAudioOut(void) const { return audio.HasAudioOut(); } bool IsPIPActive(void) const { return pip_active; } bool IsPIPVisible(void) const { return pip_visible; } diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp index b05f60c8ece..e5bb6521eaa 100644 --- a/mythtv/libs/libmythtv/tv_play.cpp +++ b/mythtv/libs/libmythtv/tv_play.cpp @@ -7863,13 +7863,8 @@ void TV::DoEditSchedule(int editType) pause_active = !actx->player || !actx->player->getVideoOutput(); if (actx->player && actx->player->getVideoOutput()) allowEmbedding = actx->player->getVideoOutput()->AllowPreviewEPG(); - if (!pause_active) - { - long long margin = (long long) - (actx->last_framerate * actx->player->GetAudioStretchFactor()); - isNearEnd = actx->player->IsNearEnd(margin); - } + isNearEnd = actx->player->IsNearEnd(); actx->UnlockDeletePlayer(__FILE__, __LINE__); }