Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeshift broken on stream restart, issue #4096 #928

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Glenn-1990
Copy link
Contributor

When a subscription gets overridden (and possible in other "stop" cases too), the timeshift reader and writer threads gets closed. The subscription stays running in idle state, but when it resumes (free tuner for example), timeshift won't be restarted.

This causes 2 problems:

  1. subscription hangs and never resumes on the client after an subscription override (or other stop code), even if it is "running" according to the tvheadend status tab.
  2. "sm_code" messages not sent to clients when SMT_NOSTART is issued. So the user is left in the dark why playback stopped.

Related to:
https://tvheadend.org/issues/4096#change-20566

@perexg I'm not sure if this is a "correct" fix, please give your opinion

@perexg
Copy link
Contributor

perexg commented Feb 20, 2017

The buffers (all previous data) must be removed in this case, otherwise the PTS timing will break.

@Glenn-1990
Copy link
Contributor Author

But this means that we won't be able to skip over the gaps in the timeshift buffer?

@perexg perexg force-pushed the master branch 18 times, most recently from c193390 to 9ca5166 Compare April 20, 2017 19:55
@Saentist
Copy link
Contributor

Saentist commented Jul 3, 2017

Its more good to be added timer "zero clients live time"
where if client X disconnect from stream and same client X isnt change channel to have Y time to reuse stream and time shift, else timeshift buffer to be destroyed .

@ljalves
Copy link
Contributor

ljalves commented Sep 8, 2019

@perexg
"...otherwise the PTS timing will break."
Doesn't that already happens when a scrambled channel fails to decode for a couple of seconds and continue to decode later on?
I believe most players can recover from a PTS discontinuity and resume playback, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants