X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/7290c1872d4f6ac37c8090e1cc2e95aeddf6e814..0d34f9703fc13e99c4d76a0ee539d58d39dded2d:/lib/dvb/dvb.cpp diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index b1e8ad54..c310d49d 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -363,6 +363,9 @@ RESULT eDVBResourceManager::allocateRawChannel(eUsePtr &channel, in { ePtr fe; + if (m_cached_channel) + m_cached_channel=0; + if (allocateFrontendByIndex(fe, frontend_index)) return errNoFrontend; @@ -377,7 +380,10 @@ RESULT eDVBResourceManager::allocateRawChannel(eUsePtr &channel, in RESULT eDVBResourceManager::allocatePVRChannel(eUsePtr &channel) { ePtr demux; - + + if (m_cached_channel) + m_cached_channel=0; + eDVBChannel *ch; ch = new eDVBChannel(this, 0); @@ -674,7 +680,7 @@ RESULT eDVBChannel::playFile(const char *file) return -ENODEV; } - m_pvr_fd_src = open(file, O_RDONLY); + m_pvr_fd_src = open(file, O_RDONLY|O_LARGEFILE); if (m_pvr_fd_src < 0) { eDebug("can't open PVR m_pvr_fd_src file %s (%m)", file); @@ -696,7 +702,7 @@ RESULT eDVBChannel::getLength(pts_t &len) return m_tstools.calcLen(len); } -RESULT eDVBChannel::getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos) +RESULT eDVBChannel::getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos, int mode) { if (!decoding_demux) return -1; @@ -712,7 +718,8 @@ RESULT eDVBChannel::getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos) pts_t now; - r = decoding_demux->getSTC(now); + /* TODO: this is a gross hack. */ + r = decoding_demux->getSTC(now, mode ? 128 : 0); if (r) { @@ -747,7 +754,7 @@ RESULT eDVBChannel::seekTo(iDVBDemux *decoding_demux, int relative, pts_t &pts) if (relative) { pts_t now; - if (getCurrentPosition(decoding_demux, now)) + if (getCurrentPosition(decoding_demux, now, 0)) { eDebug("seekTo: getCurrentPosition failed!"); return -1;