diff options
-rw-r--r-- | CONTRIBUTORS | 2 | ||||
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | dvbdevice.c | 5 |
3 files changed, 8 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 88139b51..178a5cb5 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3626,6 +3626,8 @@ Helmut Binder <cco@aon.at> lost in version 1.7.13 for adding a check for an empty command in cDvbTuner::GetSignalStats() to avoid a possible error message + for initializing the status variable in cDvbTuner::GetFrontendStatus() and + cDvbTuner::GetSignalStats() to avoid problems with drivers that don't do this Ulrich Eckhardt <uli@uli-eckhardt.de> for reporting a problem with shutdown after user inactivity in case a plugin is @@ -9532,3 +9532,6 @@ Video Disk Recorder Revision History in version 1.7.13 (thanks to Helmut Binder). - Now checking for an empty command in cDvbTuner::GetSignalStats() to avoid a possible error message (thanks to Helmut Binder). +- Now initializing the status variable in cDvbTuner::GetFrontendStatus() and + cDvbTuner::GetSignalStats() to avoid problems with drivers that don't do this + (thanks to Helmut Binder). diff --git a/dvbdevice.c b/dvbdevice.c index 93e01d71..a7797203 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 4.26 2020/10/16 13:50:36 kls Exp $ + * $Id: dvbdevice.c 4.27 2020/10/16 13:58:45 kls Exp $ */ #include "dvbdevice.h" @@ -856,6 +856,7 @@ void cDvbTuner::ClearEventQueue(void) const bool cDvbTuner::GetFrontendStatus(fe_status_t &Status) const { ClearEventQueue(); + Status = (fe_status_t)0; // initialize here to fix buggy drivers while (1) { if (ioctl(fd_frontend, FE_READ_STATUS, &Status) != -1) return true; @@ -872,7 +873,7 @@ bool cDvbTuner::GetFrontendStatus(fe_status_t &Status) const bool cDvbTuner::GetSignalStats(int &Valid, double *Strength, double *Cnr, double *BerPre, double *BerPost, double *Per, int *Status) const { ClearEventQueue(); - fe_status_t FeStatus; + fe_status_t FeStatus = (fe_status_t)0; // initialize here to fix buggy drivers dtv_property Props[MAXFRONTENDCMDS]; dtv_properties CmdSeq; memset(&Props, 0, sizeof(Props)); |