From d422d12a5b3177e919bbed3f6b259a8387ec5980 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 27 May 2024 11:35:11 -0400 Subject: [PATCH] 2024-05-27 Fred Gleason * Fixed a regression in the 'RDHPIPlayStream::play()' method that the 'play_length' setting to be ignored. Signed-off-by: Fred Gleason --- ChangeLog | 3 +++ rdhpi/rdhpiplaystream.cpp | 10 ++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 19ed743f..94352958 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24782,3 +24782,6 @@ * Fixed a bug in the 'Edit Service' dialog in rdadmin(1) that made it impossible to use a field width of greater than 8 for the 'Event ID' log import field. +2024-05-27 Fred Gleason + * Fixed a regression in the 'RDHPIPlayStream::play()' method that + the 'play_length' setting to be ignored. diff --git a/rdhpi/rdhpiplaystream.cpp b/rdhpi/rdhpiplaystream.cpp index e574fb03..649d514d 100644 --- a/rdhpi/rdhpiplaystream.cpp +++ b/rdhpi/rdhpiplaystream.cpp @@ -496,8 +496,7 @@ bool RDHPIPlayStream::play() } #endif } - bool restart_timer=false; - if(!is_paused) { + if(!is_paused) { memset(pdata,0,fragment_size); left_to_write=getDataLength()-seekWave(0,SEEK_CUR); if(left_to_writestart(FRAGMENT_TIME); playing=true; @@ -543,9 +542,8 @@ bool RDHPIPlayStream::play() emit played(); emit stateChanged(card_number,stream_number,(int)stream_state); } - restart_timer=true; } - if((play_length>0)&&restart_timer) { + if(play_length>0) { play_timer->start(play_length); start_time=QTime::currentTime(); }