use stride, allocate accel surface
[enigma2.git] / lib / dvb / decoder.cpp
index 114e383553febddfb8584b4993e049e72e2ffcb9..90bf19e1d68aa72d93f17ec8077a03482b2f3b30 100644 (file)
 #define DMX_PES_VIDEO0 DMX_PES_VIDEO
 #define DMX_PES_AUDIO0 DMX_PES_AUDIO
 #define DMX_PES_PCR0 DMX_PES_PCR
+#define DMX_PES_TELETEXT0 DMX_PES_TELETEXT
 #define DMX_PES_VIDEO1 DMX_PES_VIDEO
 #define DMX_PES_AUDIO1 DMX_PES_AUDIO
 #define DMX_PES_PCR1 DMX_PES_PCR
+#define DMX_PES_TELETEXT1 DMX_PES_TELETEXT
 #include <ost/dmx.h>
 #include <ost/video.h>
 #include <ost/audio.h>
@@ -863,7 +865,7 @@ int eTSMPEGDecoder::setState()
        const char *decoder_states[] = {"stop", "pause", "play", "decoderfastforward", "trickmode", "slowmotion"};
        eDebug("decoder state: %s, vpid=%d, apid=%d", decoder_states[m_state], m_vpid, m_apid);
 
-       bool changed = !!m_changed;
+       int changed = m_changed;
 #if HAVE_DVB_API_VERSION < 3
        bool checkAVSync = m_changed & (changeAudio|changeVideo|changePCR);
        if (m_changed & changeAudio && m_audio)
@@ -901,7 +903,7 @@ int eTSMPEGDecoder::setState()
        }
        if (m_changed & changePCR)
        {
-               m_pcr = new eDVBPCR(m_demux);
+               m_pcr = new eDVBPCR(m_demux, m_decoder);
                if (m_pcr->setPid(m_pcrpid))
                        res = -1;
        }
@@ -1005,7 +1007,7 @@ int eTSMPEGDecoder::setState()
        }
 #endif
 
-       if (m_changed & (changeState|changeVideo|changeAudio))
+       if (changed & (changeState|changeVideo|changeAudio))
        {
                                        /* play, slowmotion, fast-forward */
                int state_table[6][4] = 
@@ -1018,7 +1020,7 @@ int eTSMPEGDecoder::setState()
                                /* [stateSlowMotion] =           */ {1, m_ff_sm_ratio, 0}
                        };
                int *s = state_table[m_state];
-               if (m_changed & (changeState|changeVideo) && m_video)
+               if (changed & (changeState|changeVideo) && m_video)
                {
                        m_video->setSlowMotion(s[1]);
                        m_video->setFastForward(s[2]);
@@ -1027,7 +1029,7 @@ int eTSMPEGDecoder::setState()
                        else
                                m_video->freeze();
                }
-               if (m_changed & (changeState|changeAudio) && m_audio)
+               if (changed & (changeState|changeAudio) && m_audio)
                {
                        if (s[0])
                                m_audio->unfreeze();