proper showSinglePic error handling (thanks to Sat-Turner)
authorFelix Domke <tmbinc@elitedvb.net>
Tue, 3 Jun 2008 13:16:41 +0000 (13:16 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Tue, 3 Jun 2008 13:16:41 +0000 (13:16 +0000)
lib/dvb/decoder.cpp

index 72c6e392e020e30c9eec198ad89d322a57c52860..7ad1a25d16d0cd2f0c80eee1a7bf7e08c88ab463 100644 (file)
@@ -1145,7 +1145,7 @@ RESULT eTSMPEGDecoder::showSinglePic(const char *filename)
        {
                eDebug("showSinglePic %s", filename);
                int f = open(filename, O_RDONLY);
-               if (f)
+               if (f >= 0)
                {
                        struct stat s;
                        fstat(f, &s);