X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/4e6cd91094c4491134f5d8f81b03282fb50f7f09..8800ca10e88061b317c256f3fa90ecf486551648:/lib/dvb/dvb.cpp diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index a8dfb193..17712dde 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -1324,16 +1324,6 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off return; } - m_cue->m_lock.RdLock(); - if (!m_cue->m_decoding_demux) - { - start = current_offset; - size = max; - eDebug("getNextSourceSpan, no decoding demux. forcing normal play"); - m_cue->m_lock.Unlock(); - return; - } - if (m_skipmode_n) { eDebug("skipmode %d:%d (x%d)", m_skipmode_m, m_skipmode_n, m_skipmode_frames); @@ -1341,7 +1331,6 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off } eDebug("getNextSourceSpan, current offset is %08llx, m_skipmode_m = %d!", current_offset, m_skipmode_m); - int frame_skip_success = 0; if (m_skipmode_m) @@ -1386,6 +1375,8 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off } } + m_cue->m_lock.RdLock(); + while (!m_cue->m_seek_requests.empty()) { std::pair seek = m_cue->m_seek_requests.front(); @@ -1410,6 +1401,13 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off eDebug("decoder getPTS failed, can't seek relative"); continue; } + if (!m_cue->m_decoding_demux) + { + eDebug("getNextSourceSpan, no decoding demux. couldn't seek to %llx... ignore request!", pts); + start = current_offset; + size = max; + continue; + } if (getCurrentPosition(m_cue->m_decoding_demux, now, 1)) { eDebug("seekTo: getCurrentPosition failed!"); @@ -1766,6 +1764,8 @@ RESULT eDVBChannel::playFile(const char *file) m_pvr_thread->setStreamMode(1); m_pvr_thread->setScatterGather(this); + m_event(this, evtPreStart); + if (m_pvr_thread->start(file, m_pvr_fd_dst)) { delete m_pvr_thread;