add flush to filepush
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 13 Nov 2005 18:25:04 +0000 (18:25 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 13 Nov 2005 18:25:04 +0000 (18:25 +0000)
lib/base/filepush.cpp
lib/base/filepush.h

index ee83f14..73dc519 100644 (file)
@@ -7,7 +7,7 @@
 eFilePushThread::eFilePushThread()
 {
        m_stop = 0;
 eFilePushThread::eFilePushThread()
 {
        m_stop = 0;
-       m_buf_start = m_buf_end = 0;
+       flush();
 }
 
 static void signal_handler(int x)
 }
 
 static void signal_handler(int x)
@@ -108,3 +108,9 @@ void eFilePushThread::resume()
        m_stop = 0;
        run();
 }
        m_stop = 0;
        run();
 }
+
+void eFilePushThread::flush()
+{
+       m_buf_start = m_buf_end = 0;
+}
+
index 021a7c9..a419d71 100644 (file)
@@ -16,6 +16,9 @@ public:
        void seek(int whence, off_t where);
        void resume();
        
        void seek(int whence, off_t where);
        void resume();
        
+               /* flushes the internal readbuffer */ 
+       void flush();
+       
 private:
        int m_stop;
        unsigned char m_buffer[65536];
 private:
        int m_stop;
        unsigned char m_buffer[65536];