From 5dcb47606caf94ba1fe3a07f7795890fda3bdcee Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 27 Jul 2022 15:27:14 +0200 Subject: [PATCH] para_play: Avoid invalid time display on pause. When para_play enters pause mode, playback is stopped by notifying the writer node, causing it to terminate in the next iteration of the main loop. Until then the play time is computed incorrectly because we add the running time of the moribund writer node to the start time computed from the *new* start chunk set in com_pause(). Fortunately, the fix is simple. We just need to enqueue a reposition request in the same way the ff and jmp commands do. --- play.c | 1 + 1 file changed, 1 insertion(+) diff --git a/play.c b/play.c index 14fac42f..ba9fff70 100644 --- a/play.c +++ b/play.c @@ -854,6 +854,7 @@ static int com_pause(__a_unused struct lls_parse_result *lpr) ss = PARA_MAX(ss, 0UL); ss = PARA_MIN(ss, pt->num_chunks); pt->start_chunk = ss; + pt->rq = CRT_REPOS; kill_stream(); return 0; } -- 2.39.2