X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/734c3316b09f9dab14338d66ea2400dd734a0080..cecd9068fcba09234232399748d4a55ed7574e4b:/lib/service/servicedvb.cpp diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 64545227..1a3cb0e0 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -1128,11 +1128,7 @@ RESULT eDVBServicePlay::stop() if (length) { - int perc = play_position * 100LL / length; - - /* only store last play position when between 1% and 99% */ - if ((1 < perc) && (perc < 99)) - m_cue_entries.insert(cueEntry(play_position, 3)); /* last play position */ + m_cue_entries.insert(cueEntry(play_position, 3)); /* last play position */ } m_cuesheet_changed = 1; } @@ -2303,6 +2299,7 @@ void eDVBServicePlay::switchToTimeshift() void eDVBServicePlay::updateDecoder(bool sendSeekableStateChanged) { int vpid = -1, vpidtype = -1, pcrpid = -1, tpid = -1, achannel = -1, ac3_delay=-1, pcm_delay=-1; + bool mustPlay = false; eDVBServicePMTHandler &h = m_timeshift_active ? m_service_handler_timeshift : m_service_handler; @@ -2383,11 +2380,10 @@ void eDVBServicePlay::updateDecoder(bool sendSeekableStateChanged) Py_DECREF(subs); } } - m_decoder->play(); /* pids will be set later */ } if (m_cue) m_cue->setDecodingDemux(m_decode_demux, m_decoder); - m_decoder->play(); /* pids will be set later. */ + mustPlay = true; } m_timeshift_changed = 0; @@ -2453,7 +2449,11 @@ void eDVBServicePlay::updateDecoder(bool sendSeekableStateChanged) m_decoder->setRadioPic(radio_pic); } - m_decoder->set(); + if (mustPlay) + m_decoder->play(); + else + m_decoder->set(); + m_decoder->setAudioChannel(achannel); /* don't worry about non-existing services, nor pvr services */ @@ -2572,7 +2572,7 @@ void eDVBServicePlay::cutlistToCuesheet() { if (i == m_cue_entries.end()) { - if (!have_any_span) + if (!have_any_span && !in) break; out = length; } else { @@ -2602,6 +2602,7 @@ void eDVBServicePlay::cutlistToCuesheet() { have_any_span = 1; m_cue->addSourceSpan(in, out); + in = out = 0; } in = length;