Ticket #6974: mythtv-6974-IsNearEnd_margin_for_end_of_recording_prompt.patch

File mythtv-6974-IsNearEnd_margin_for_end_of_recording_prompt.patch, 976 bytes (added by sphery, 10 years ago)

Allows playing recording closer to the end when end-of-recording prompt is enabled. Must be used with play-to-end.patch .

  • libs/libmythtv/tv_play.cpp

    old new  
    30233023    mctx->LockDeleteNVP(__FILE__, __LINE__);
    30243024    if (mctx->GetState() == kState_WatchingPreRecorded && mctx->nvp)
    30253025    {
    3026         if (!mctx->nvp->IsNearEnd())
     3026        long long margin = (long long) ((mctx->nvp->GetAudioStretchFactor() *
     3027                                         mctx->nvp->GetFrameRate()) / 3);
     3028        if (margin < 1)
     3029            margin = -1;
     3030        if (!mctx->nvp->IsNearEnd(margin))
    30273031            jumped_back = false;
    30283032
    3029         do_prompt = mctx->nvp->IsNearEnd() && !jumped_back &&
     3033        do_prompt = mctx->nvp->IsNearEnd(margin) && !jumped_back &&
    30303034            !mctx->nvp->IsEmbedding() && !mctx->paused;
    30313035    }
    30323036    mctx->UnlockDeleteNVP(__FILE__, __LINE__);