From 6b01e6e3bc442668ae2b358130a8d9c12f4f8b60 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 12 Feb 2011 18:14:20 +0100 Subject: [PATCH] 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 ;) --- lib/dvb/decoder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.7.4