new drivers have shorter clip input buffers.. so we have to handle short writes or...
authorghost <andreas.monzner@multimedia-labs.de>
Sat, 12 Feb 2011 17:14:20 +0000 (18:14 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Sat, 12 Feb 2011 17:14:20 +0000 (18:14 +0100)
lib/dvb/decoder.cpp

index 88cd3ee..45dde8b 100644 (file)
@@ -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;