X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/6fdb2d2094c50a2bc324f4094473c2107d2ea943..d7ab8980f447224e6ece5d741dd9a334949ca315:/lib/dvb/dvb.cpp diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index 21ebecf1..414ab8da 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -1752,16 +1752,8 @@ RESULT eDVBChannel::getCurrentFrontendParameters(ePtr &p RESULT eDVBChannel::playFile(const char *file) { - ASSERT(!m_frontend); - if (m_pvr_thread) - { - m_pvr_thread->stop(); - delete m_pvr_thread; - m_pvr_thread = 0; - } - eRawFile *f = new eRawFile(); - ePtr source = f; + ePtr source = f; if (f->open(file) < 0) { @@ -1772,9 +1764,23 @@ RESULT eDVBChannel::playFile(const char *file) return playSource(source, file); } -RESULT eDVBChannel::playSource(ePtr &source, const char *priv) +RESULT eDVBChannel::playSource(ePtr &source, const char *streaminfo_file) { - m_tstools.setSource(source, priv); + ASSERT(!m_frontend); + if (m_pvr_thread) + { + m_pvr_thread->stop(); + delete m_pvr_thread; + m_pvr_thread = 0; + } + + if (!source->valid()) + { + eDebug("PVR source is not valid!"); + return -ENOENT; + } + + m_tstools.setSource(source, streaminfo_file); /* DON'T EVEN THINK ABOUT FIXING THIS. FIX THE ATI SOURCES FIRST, THEN DO A REAL FIX HERE! */ @@ -1820,6 +1826,8 @@ void eDVBChannel::stopSource() } if (m_pvr_fd_dst >= 0) ::close(m_pvr_fd_dst); + ePtr d; + m_tstools.setSource(d); } void eDVBChannel::stopFile()