diff options
| author | Felix Domke <felix.domke@multimedia-labs.de> | 2009-08-09 22:58:57 +0200 |
|---|---|---|
| committer | Felix Domke <felix.domke@multimedia-labs.de> | 2009-08-09 22:58:57 +0200 |
| commit | ce31b562c29e94d2421e0a2b0257030eca97f1cd (patch) | |
| tree | c400903415956d690a4e52c7425ee769d14c7803 /lib/service/servicedvb.cpp | |
| parent | cdaaee0da655f7d08c5cda38877ec798482c9706 (diff) | |
| parent | b15e769c8b4a63847c9ebe53eb4b5c1435bae778 (diff) | |
| download | enigma2-ce31b562c29e94d2421e0a2b0257030eca97f1cd.tar.gz enigma2-ce31b562c29e94d2421e0a2b0257030eca97f1cd.zip | |
Merge branch 'master' of git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/service/servicedvb.cpp')
| -rw-r--r-- | lib/service/servicedvb.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 5166414f..a75c6cac 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -2329,23 +2329,24 @@ void eDVBServicePlay::updateDecoder() m_decoder->connectVideoEvent(slot(*this, &eDVBServicePlay::video_event), m_video_event_connection); if (m_is_primary) { - ePyObject subs; - if (m_timeshift_changed) - subs = getCachedSubtitle(); m_teletext_parser = new eDVBTeletextParser(m_decode_demux); m_teletext_parser->connectNewPage(slot(*this, &eDVBServicePlay::newSubtitlePage), m_new_subtitle_page_connection); m_subtitle_parser = new eDVBSubtitleParser(m_decode_demux); m_subtitle_parser->connectNewPage(slot(*this, &eDVBServicePlay::newDVBSubtitlePage), m_new_dvb_subtitle_page_connection); - if (subs) + if (m_timeshift_changed) { - int type = PyInt_AsLong(PyTuple_GET_ITEM(subs, 0)), - pid = PyInt_AsLong(PyTuple_GET_ITEM(subs, 1)), - comp_page = PyInt_AsLong(PyTuple_GET_ITEM(subs, 2)), // ttx page - anc_page = PyInt_AsLong(PyTuple_GET_ITEM(subs, 3)); // ttx magazine - if (type == 0) // dvb - m_subtitle_parser->start(pid, comp_page, anc_page); - else if (type == 1) // ttx - m_teletext_parser->setPageAndMagazine(comp_page, anc_page); + ePyObject subs = getCachedSubtitle(); + if (subs != Py_None) + { + int type = PyInt_AsLong(PyTuple_GET_ITEM(subs, 0)), + pid = PyInt_AsLong(PyTuple_GET_ITEM(subs, 1)), + comp_page = PyInt_AsLong(PyTuple_GET_ITEM(subs, 2)), // ttx page + anc_page = PyInt_AsLong(PyTuple_GET_ITEM(subs, 3)); // ttx magazine + if (type == 0) // dvb + m_subtitle_parser->start(pid, comp_page, anc_page); + else if (type == 1) // ttx + m_teletext_parser->setPageAndMagazine(comp_page, anc_page); + } Py_DECREF(subs); } } |
