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 72c6e39..7ad1a25 100644 (file)
@@ -1145,7 +1145,7 @@ RESULT eTSMPEGDecoder::showSinglePic(const char *filename)
        {
                eDebug("showSinglePic %s", filename);
                int f = open(filename, O_RDONLY);
        {
                eDebug("showSinglePic %s", filename);
                int f = open(filename, O_RDONLY);
-               if (f)
+               if (f >= 0)
                {
                        struct stat s;
                        fstat(f, &s);
                {
                        struct stat s;
                        fstat(f, &s);