diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/audio.c | 2 | ||||
-rw-r--r-- | player/video.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/player/audio.c b/player/audio.c index 62bc5405f1..d56b97c5ba 100644 --- a/player/audio.c +++ b/player/audio.c @@ -736,6 +736,8 @@ static int filter_audio(struct MPContext *mpctx, struct mp_audio_buffer *outbuf, struct ao_chain *ao_c = mpctx->ao_chain; double endpts = get_play_end_pts(mpctx); + if (endpts != MP_NOPTS_VALUE) + endpts *= mpctx->play_dir; bool eof = false; if (!copy_output(mpctx, ao_c, minsamples, endpts, &eof)) diff --git a/player/video.c b/player/video.c index 4d8d5d0260..dd48e0a529 100644 --- a/player/video.c +++ b/player/video.c @@ -483,6 +483,8 @@ static int video_output_image(struct MPContext *mpctx) } if (img) { double endpts = get_play_end_pts(mpctx); + if (endpts != MP_NOPTS_VALUE) + endpts *= mpctx->play_dir; if ((endpts != MP_NOPTS_VALUE && img->pts >= endpts) || mpctx->max_frames == 0) { |