fix memory corruption on showSinglePic
[enigma2.git] / lib / dvb / dvbtime.h
index ec47de4611d2bd6ffe0bcf7627cdf62aa3a6c291..a5114f82a1eeb063ae287c0e9ab3b43afdd5b8cb 100644 (file)
@@ -18,6 +18,13 @@ inline int fromBCD(int bcd)
        return ((bcd&0xF0)>>4)*10+(bcd&0xF);
 }
 
+inline int toBCD(int dec)
+{
+       if (dec >= 100)
+               return -1;
+       return int(dec/10)*0x10 + dec%10;
+}
+
 time_t parseDVBtime(__u8 t1, __u8 t2, __u8 t3, __u8 t4, __u8 t5);
 
 class TDT: public eGTable
@@ -25,7 +32,7 @@ class TDT: public eGTable
        eDVBChannel *chan;
        ePtr<iDVBDemux> demux;
        eTimer m_interval_timer;
-       int createTable(int nr, const __u8 *data, unsigned int max);
+       int createTable(unsigned int nr, const __u8 *data, unsigned int max);
        void ready(int);
        int update_count;
 public:
@@ -66,10 +73,10 @@ class eDVBLocalTimeHandler: public Object
 #endif
 public:
 #ifndef SWIG
-       PSignal0<void> m_timeUpdated;
        eDVBLocalTimeHandler();
        ~eDVBLocalTimeHandler();
 #endif
+       PSignal0<void> m_timeUpdated;
        time_t nowTime() const { return m_time_ready ? ::time(0)+m_time_difference : -1; }
        bool ready() const { return m_time_ready; }
        int difference() const { return m_time_difference; }