summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-01-13 22:39:04 +0100
committerJohns <johns98@gmx.net>2012-01-13 22:39:04 +0100
commiteec30433b68ea0e9c66cb4a947faafd6a9681f55 (patch)
tree7e81f3673ad7e0238b12bda22786a80d16a4ddf2
parentbaf577aba59a85cfe41849606256a279523fa50c (diff)
downloadvdr-plugin-softhddevice-eec30433b68ea0e9c66cb4a947faafd6a9681f55.tar.gz
vdr-plugin-softhddevice-eec30433b68ea0e9c66cb4a947faafd6a9681f55.tar.bz2
Fix bug: AudioFreeBytes fails if no audio ready.
-rw-r--r--ChangeLog2
-rw-r--r--audio.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 453d3ad..38e9889 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
User johns
Date:
+ Fix bug: AudioFreeBytes didn't check if audio running/compiled.
+ Fix bug: snd_pcm_state: Assertion `pcm' failed.
Add support for fullscreen and fullscreen toogle.
Instant update deinterlace configuration changes.
Fix subtitle position.
diff --git a/audio.c b/audio.c
index c7f04b1..1ef155c 100644
--- a/audio.c
+++ b/audio.c
@@ -1735,12 +1735,12 @@ void AudioPoller(void)
int AudioFreeBytes(void)
{
#ifdef USE_ALSA
- return RingBufferFreeBytes(AlsaRingBuffer);
+ return AlsaRingBuffer ? RingBufferFreeBytes(AlsaRingBuffer) : INT32_MAX;
#endif
#ifdef USE_OSS
- return RingBufferFreeBytes(OssRingBuffer);
+ return OssRingBuffer ? RingBufferFreeBytes(OssRingBuffer) : INT32_MAX;
#endif
- return -1;
+ return INT32_MAX; // no driver, much space
}
/**