From f68d9e75f8957957a9b97e2883a9482fd0b6479a Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 25 May 2019 23:04:26 +0200 Subject: player: fix --end for backwards playback We need to transform the timestamp returned by get_play_end_pts(). I considered making it return the transformed timestamp directly. There are 4 callers; 2 need a transformed timestamps, 2 don't. So I guess it doesn't matter. --- player/audio.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'player/audio.c') 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)) -- cgit v1.2.3