summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--audio.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c36ab12..b1d661a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ User johns
Date:
Release Version 0.5.1
+ Fix bug: audio use 100% CPU during pause.
Guard audio skip against old PTS values.
Improved audio skip, after channel switch.
Setup add preview of collapsed tree.
diff --git a/audio.c b/audio.c
index f7fcc41..cfab1bf 100644
--- a/audio.c
+++ b/audio.c
@@ -3474,6 +3474,10 @@ static void *AudioPlayHandlerThread(void *dummy)
AudioResetNormalizer();
}
}
+ // FIXME: check AudioPaused ...Thread()
+ if (AudioPaused) {
+ break;
+ }
} while (AudioRing[AudioRingRead].HwSampleRate);
}
return dummy;
@@ -3755,7 +3759,7 @@ void AudioVideoReady(int64_t pts)
VideoAudioDelay / 90, skip / 90);
#endif
// guard against old PTS
- if (skip> 0 && skip < 2000 * 90) {
+ if (skip > 0 && skip < 2000 * 90) {
skip = (((int64_t) skip * AudioRing[AudioRingWrite].HwSampleRate)
/ (1000 * 90))
* AudioRing[AudioRingWrite].HwChannels * AudioBytesProSample;