another try to fix ScanSetup
[enigma2.git] / lib / base / filepush.cpp
index 17b767f..73dc519 100644 (file)
@@ -1,3 +1,4 @@
+#include <config.h>
 #include <lib/base/filepush.h>
 #include <lib/base/eerror.h>
 #include <errno.h>
@@ -6,7 +7,7 @@
 eFilePushThread::eFilePushThread()
 {
        m_stop = 0;
-       m_buf_start = m_buf_end = 0;
+       flush();
 }
 
 static void signal_handler(int x)
@@ -97,9 +98,9 @@ void eFilePushThread::pause()
        stop();
 }
 
-void eFilePushThread::seek(off_t where)
+void eFilePushThread::seek(int whence, off_t where)
 {
-       ::lseek(m_fd_source, where, SEEK_SET);
+       ::lseek(m_fd_source, where, whence);
 }
 
 void eFilePushThread::resume()
@@ -107,3 +108,9 @@ void eFilePushThread::resume()
        m_stop = 0;
        run();
 }
+
+void eFilePushThread::flush()
+{
+       m_buf_start = m_buf_end = 0;
+}
+