summaryrefslogtreecommitdiff
path: root/tools/backgroundwriter.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/backgroundwriter.c')
-rw-r--r--tools/backgroundwriter.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/backgroundwriter.c b/tools/backgroundwriter.c
index a4296d91..aa321dd7 100644
--- a/tools/backgroundwriter.c
+++ b/tools/backgroundwriter.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: backgroundwriter.c,v 1.8 2009-03-18 21:05:26 phintuka Exp $
+ * $Id: backgroundwriter.c,v 1.9 2009-07-21 09:48:35 phintuka Exp $
*
*/
@@ -105,7 +105,8 @@ bool cBackgroundWriterI::Flush(int TimeoutMs)
cCondWait::SleepMs(3);
}
- if(m_IsSocket && m_RingBuffer.Available() <= 0) {
+ int Available = m_RingBuffer.Available();
+ if(m_IsSocket && Available <= 0) {
// flush corked data too
#if defined(TCP_CORK)
int i = 1;
@@ -122,8 +123,8 @@ bool cBackgroundWriterI::Flush(int TimeoutMs)
}
#endif
}
-
- return m_RingBuffer.Available() <= 0;
+
+ return Available <= 0;
}