Opened 17 years ago
Closed 15 years ago
#3618 closed patch (fixed)
LiveTV Safeguards
Reported by: | stuartm | Owned by: | danielk |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
We really need some more effective safeguards to prevent livetv recording to a single file for two days straight and causing auto-expire to delete all the other recordings. Even if all the known livetv bugs are fixed the ones we don't know about have the potential to do a lot of damage.
The safeguards have to be handled somewhere where a loop in the recorder or playback code won't prevent those conditions from ever being checked. I was using my idle timer on that machine, but it never got a chance to work - I assume because we were stuck in a loop (possibly the "LiveTV JumpTo? 1" loop).
Right now the precaution of never recording a programme that is more than 6 hours long is based on guide data, we don't use a timer to actually check how long we have been recording. We also need a check on filesizes so that we don't exceed an maximum e.g. 10Gb for SD
Attachments (3)
Change History (8)
comment:1 Changed 16 years ago by
Changed 16 years ago by
Attachment: | mythtv_tvchain_clearswitch.diff added |
---|
Always clear NeedsToJump/NeedsToSwitch?
comment:2 Changed 16 years ago by
Milestone: | unknown → 0.22 |
---|
comment:3 Changed 15 years ago by
Owner: | changed from Isaac Richards to danielk |
---|---|
Status: | new → assigned |
comment:4 Changed 15 years ago by
Type: | task → patch |
---|
The first patch is a real fix I think. The second patch depends on the first but is only a safeguard against endless NeedsToSwitch/NeedsToJump? loops.
The endless JumpTo? loop scenario goes like this ...
Once NeedsToJump? is set in livetvchain it is only cleared by GetJumpPos?(). But livetvchain->GetSwitchProgram?() can return NULL, if we're already on the correct entry or it can't find the program which means an early return from NVP::JumpToProgram?() and GetJumpPos?() is never called and we loop forever.
The mythtv_NVP_GetJumpPos.diff patch addresses this by moving the call to GetJumpPos?() to before GetSwitchProgram?() so that NeedsToJump? is always cleared.
The second patch for LiveTVChain::GetSwitchProgram?() ensures that both NeedsToJump? and NeedsToSwitch? are always cleared in GetSwitchProgram?(). The comment above GetSwitchProgram?() already stated this was true but it didn't actually clear NeedsToJump? and didn't clear NeedsToSwitch? in all cases. This should provide a bit of a safeguard against endless loops.