summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Yves Avenard <jyavenard@mythtv.org>2011-03-07 01:25:12 (GMT)
committer Jean-Yves Avenard <jyavenard@mythtv.org>2011-03-07 07:04:33 (GMT)
commit9d533f3de7c5e73704c555bec0df58710e0b4f43 (patch)
treefd528efbf19fc803f4fec96a5f00303196ad7de4
parentb41e2182b34832f29becceb52a795d67bbd0bdd7 (diff)
Do not attempt to increase ALSA buffer size if it's already set to the maximum the hardware can handle
-rw-r--r--mythtv/libs/libmyth/audiooutputalsa.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/mythtv/libs/libmyth/audiooutputalsa.cpp b/mythtv/libs/libmyth/audiooutputalsa.cpp
index 216beec..006684a 100644
--- a/mythtv/libs/libmyth/audiooutputalsa.cpp
+++ b/mythtv/libs/libmyth/audiooutputalsa.cpp
@@ -246,6 +246,13 @@ bool AudioOutputALSA::IncPreallocBufferSize(int requested, int buffer_time)
VBAUDIO(QString("Hardware audio buffer cur: %1 need: %2 max allowed: %3")
.arg(cur).arg(size).arg(max));
+ if (cur == max)
+ {
+ // It's already the maximum it can be, no point trying further
+ pfile.close();
+ mfile.close();
+ return false;
+ }
if (size > max || !size)
{
size = max;