first start pcr for api v3
[enigma2.git] / lib / dvb / decoder.cpp
index 7bdb306..0f522b2 100644 (file)
@@ -363,6 +363,22 @@ int eTSMPEGDecoder::setState()
                m_changed &= ~changeAudio;
        }
 #else
+       if (m_changed & changePCR)
+       {
+               if (m_pcr)
+                       m_pcr->stop();
+               m_pcr = 0;
+               if ((m_pcrpid >= 0) && (m_pcrpid < 0x1FFF))
+               {
+                       m_pcr = new eDVBPCR(m_demux);
+                       if (m_pcr->startPid(m_pcrpid))
+                       {
+                               eWarning("pcr: startpid failed!");
+                               res = -1;
+                       }
+               }
+               m_changed &= ~changePCR;
+       }
        if (m_changed & changeVideo)
        {
                eDebug("VIDEO CHANGED (to %04x)", m_vpid);
@@ -384,22 +400,6 @@ int eTSMPEGDecoder::setState()
                }
                m_changed &= ~changeVideo;
        }
-       if (m_changed & changePCR)
-       {
-               if (m_pcr)
-                       m_pcr->stop();
-               m_pcr = 0;
-               if ((m_pcrpid >= 0) && (m_pcrpid < 0x1FFF))
-               {
-                       m_pcr = new eDVBPCR(m_demux);
-                       if (m_pcr->startPid(m_pcrpid))
-                       {
-                               eWarning("pcr: startpid failed!");
-                               res = -1;
-                       }
-               }
-               m_changed &= ~changePCR;
-       }
        if (m_changed & changeAudio)
        {
                if (m_audio)