- eDebug("sending PVR commit");
- already_empty = 1;
- if (::ioctl(m_fd_dest, PVR_COMMIT) < 0 && errno == EINTR)
- continue;
- eDebug("commit done");
- /* well check again */
- continue;
+ struct pollfd pfd;
+ pfd.fd = m_fd_dest;
+ pfd.events = POLLIN;
+ switch (poll(&pfd, 1, 250)) // wait for 250ms
+ {
+ case 0:
+ eDebug("wait for driver eof timeout");
+ continue;
+ case 1:
+ eDebug("wait for driver eof ok");
+ break;
+ default:
+ eDebug("wait for driver eof aborted by signal");
+ continue;
+ }