From: ghost Date: Sat, 12 Feb 2011 17:14:20 +0000 (+0100) Subject: new drivers have shorter clip input buffers.. so we have to handle short writes or... X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=6b01e6e3bc442668ae2b358130a8d9c12f4f8b60 new drivers have shorter clip input buffers.. so we have to handle short writes or we have to use blocking mode.. the 2nd is easier ;) --- diff --git a/lib/dvb/decoder.cpp b/lib/dvb/decoder.cpp index 88cd3ee..45dde8b 100644 --- a/lib/dvb/decoder.cpp +++ b/lib/dvb/decoder.cpp @@ -1299,10 +1299,11 @@ RESULT eTSMPEGDecoder::showSinglePic(const char *filename) if (f >= 0) { struct stat s; + size_t written=0; fstat(f, &s); if (m_video_clip_fd == -1) - m_video_clip_fd = open("/dev/dvb/adapter0/video0", O_WRONLY|O_NONBLOCK); - if (m_video_clip_fd >= 0) + m_video_clip_fd = open("/dev/dvb/adapter0/video0", O_WRONLY); + while (m_video_clip_fd >= 0) { bool seq_end_avail = false; size_t pos=0;