proper showSinglePic error handling (thanks to Sat-Turner)
[enigma2.git] / lib / dvb / decoder.cpp
index 966b59277f94d4ddbdfc91e3abfd3f784814e12a..7ad1a25d16d0cd2f0c80eee1a7bf7e08c88ab463 100644 (file)
@@ -282,11 +282,8 @@ void eDVBAudio::setChannel(int channel)
 
 int eDVBAudio::getPTS(pts_t &now)
 {
 
 int eDVBAudio::getPTS(pts_t &now)
 {
-       eDebugNoNewLine("AUDIO_GET_PTS - ");
        if (::ioctl(m_fd, AUDIO_GET_PTS, &now) < 0)
        if (::ioctl(m_fd, AUDIO_GET_PTS, &now) < 0)
-               eDebug("failed (%m)");
-       else
-               eDebug("ok");
+               eDebug("AUDIO_GET_PTS failed (%m)");
        return 0;
 }
 
        return 0;
 }
 
@@ -1148,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);