summaryrefslogtreecommitdiff
path: root/audio.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-06-30 00:19:36 +0200
committerJohns <johns98@gmx.net>2012-06-30 00:19:36 +0200
commitd486fb2ca1e27fa66a52dcf60506cba6d9d464d2 (patch)
treed2e46fa3035e567c70815cc5db7cb6cb7409ce6e /audio.c
parent73d65968aeb78a31ba793923ce849ab5651e6e49 (diff)
downloadvdr-plugin-softhddevice-d486fb2ca1e27fa66a52dcf60506cba6d9d464d2.tar.gz
vdr-plugin-softhddevice-d486fb2ca1e27fa66a52dcf60506cba6d9d464d2.tar.bz2
Fix bug: audio use 100% CPU during pause.
Diffstat (limited to 'audio.c')
-rw-r--r--audio.c6
1 files changed, 5 insertions, 1 deletions
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;