- add looping for ts playbacks (hack for prodrive)
[enigma2.git] / lib / base / filepush.cpp
index b85edbc1703e54b700f481e09f330b2cc064bbe3..5413f0483dbcb87fd32e1f84b6612444551c22ee 100644 (file)
@@ -38,7 +38,7 @@ void eFilePushThread::thread()
                                eDebug("eFilePushThread *write error* - not yet handled");
                                // ... we would stop the thread
                        }
-                       printf("FILEPUSH: wrote %d bytes\n", w);
+//                     printf("FILEPUSH: wrote %d bytes\n", w);
                        m_buf_start += w;
                        continue;
                }
@@ -53,7 +53,17 @@ void eFilePushThread::thread()
                                continue;
                        eDebug("eFilePushThread *read error* - not yet handled");
                }
-               printf("FILEPUSH: read %d bytes\n", m_buf_end);
+               if (m_buf_end == 0)
+               {
+                       eDebug("FILEPUSH: end-of-file! (currently unhandled)");
+                       if (!lseek(m_fd_source, 0, SEEK_SET))
+                       {
+                               eDebug("(looping)");
+                               continue;
+                       }
+                       break;
+               }
+//             printf("FILEPUSH: read %d bytes\n", m_buf_end);
        }
        
        eDebug("FILEPUSH THREAD STOP");