From: Andre Noll Date: Wed, 27 Jul 2022 13:27:14 +0000 (+0200) Subject: para_play: Avoid invalid time display on pause. X-Git-Tag: v0.7.1~9 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;ds=sidebyside;h=5dcb47606caf94ba1fe3a07f7795890fda3bdcee;p=paraslash.git 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. --- 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; }