}
}
-int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux, eCueSheet *cue, bool simulate)
+int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux, eCueSheet *cue, bool simulate, eDVBService *service)
{
RESULT res=0;
m_reference = ref;
m_use_decode_demux = use_decode_demux;
+
+ /* use given service as backup. This is used for timeshift where we want to clone the live stream using the cache, but in fact have a PVR channel */
+ m_service = service;
/* is this a normal (non PVR) channel? */
if (ref.path.empty())
r.path = m_timeshift_file;
m_cue = new eCueSheet();
- m_service_handler_timeshift.tune(r, 1, m_cue); /* use the decoder demux for everything */
+ m_service_handler_timeshift.tune(r, 1, m_cue, 0, m_dvb_service); /* use the decoder demux for everything */
eDebug("eDVBServicePlay::switchToTimeshift, in pause mode now.");
pause();
eDVBServicePMTHandler &h = m_timeshift_active ? m_service_handler_timeshift : m_service_handler;
eDVBServicePMTHandler::program program;
- if (h.getProgramInfo(program) && m_service_handler.getProgramInfo(program))
+ if (h.getProgramInfo(program))
eDebug("getting program info failed.");
else
{