Skip to content

Commit

Permalink
Fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
natario1 committed Aug 12, 2024
1 parent 8c783d6 commit 0519cf3
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,8 @@ internal class DefaultTranscodeEngine(
break
}

if (!advanced) {
val needsSleep = (audio?.needsSleep() ?: false) or (video?.needsSleep() ?: false)
if (needsSleep) {
Thread.sleep(WAIT_MS)
}
if (!advanced && audio?.needsSleep() != false && video?.needsSleep() != false) {
Thread.sleep(WAIT_MS)
}

if (advanced && ++loop % PROGRESS_LOOPS == 0L) {
Expand Down

0 comments on commit 0519cf3

Please sign in to comment.