From: ghost Date: Tue, 11 Nov 2008 19:20:20 +0000 (+0100) Subject: decoder.cpp: stop all pids first, and the restart pids... this hopefully fixes proble... X-Git-Tag: 2.6.0~615^2 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/9b2e15bfcd146def03ba08f538e0877bd20be749?hp=17e9e23c08a998eaa4ba6940cd09a9455f2ccf59 decoder.cpp: stop all pids first, and the restart pids... this hopefully fixes problems on pmt change on DM800/DM8000 --- diff --git a/lib/dvb/decoder.cpp b/lib/dvb/decoder.cpp index 5fa59ed4..6ad39225 100644 --- a/lib/dvb/decoder.cpp +++ b/lib/dvb/decoder.cpp @@ -836,37 +836,40 @@ int eTSMPEGDecoder::setState() 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)) - res = -1; - } - m_changed &= ~changePCR; } if (m_changed & changeVideo) { - eDebug("VIDEO CHANGED (to %04x)", m_vpid); if (m_video) { m_video->stop(); m_video = 0; m_video_event_conn = 0; } - if ((m_vpid >= 0) && (m_vpid < 0x1FFF)) - { - m_video = new eDVBVideo(m_demux, m_decoder); - m_video->connectEvent(slot(*this, &eTSMPEGDecoder::video_event), m_video_event_conn); - if (m_video->startPid(m_vpid, m_vtype)) - res = -1; - } - m_changed &= ~changeVideo; } if (m_changed & changeAudio) { if (m_audio) m_audio->stop(); m_audio = 0; + } + if (m_changed & changeText) + { + if (m_text) + m_text->stop(); + m_text = 0; + } + if (m_changed & changePCR) + { + if ((m_pcrpid >= 0) && (m_pcrpid < 0x1FFF)) + { + m_pcr = new eDVBPCR(m_demux); + if (m_pcr->startPid(m_pcrpid)) + res = -1; + } + m_changed &= ~changePCR; + } + if (m_changed & changeAudio) + { if ((m_apid >= 0) && (m_apid < 0x1FFF) && !noaudio) { m_audio = new eDVBAudio(m_demux, m_decoder); @@ -875,11 +878,19 @@ int eTSMPEGDecoder::setState() } m_changed &= ~changeAudio; } + if (m_changed & changeVideo) + { + if ((m_vpid >= 0) && (m_vpid < 0x1FFF)) + { + m_video = new eDVBVideo(m_demux, m_decoder); + m_video->connectEvent(slot(*this, &eTSMPEGDecoder::video_event), m_video_event_conn); + if (m_video->startPid(m_vpid, m_vtype)) + res = -1; + } + m_changed &= ~changeVideo; + } if (m_changed & changeText) { - if (m_text) - m_text->stop(); - m_text = 0; if ((m_textpid >= 0) && (m_textpid < 0x1FFF) && !nott) { m_text = new eDVBTText(m_demux);