From 842c2cc6024b01b258f159b891881b59d244983a Mon Sep 17 00:00:00 2001
From: Roger Siddons <dizygotheca@ntlworld.com>
Date: Thu, 5 Nov 2015 13:08:16 +0000
Subject: [PATCH] TVRec: Close failing recordings so they are not reactivated
by EIT scans.
Clear recording info when a failing recording is stopped. Otherwise the next EIT scan restarts it.
Fixes part of 12281
diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp
index 947ff29..af70c47 100644
a
|
b
|
void TVRec::TeardownRecorder(uint request_flags) |
1129 | 1129 | delete recorderThread; |
1130 | 1130 | recorderThread = NULL; |
1131 | 1131 | } |
1132 | | ClearFlags(kFlagRecorderRunning, __FILE__, __LINE__); |
| 1132 | ClearFlags(kFlagRecorderRunning | kFlagNeedToStartRecorder, |
| 1133 | __FILE__, __LINE__); |
1133 | 1134 | |
1134 | 1135 | RecordingQuality *recq = NULL; |
1135 | 1136 | if (recorder) |
… |
… |
void TVRec::TuningShutdowns(const TuningRequest &request) |
3603 | 3604 | } |
3604 | 3605 | |
3605 | 3606 | if (HasFlags(kFlagRecorderRunning) || |
3606 | | (curRecording && curRecording->GetRecordingStatus() == RecStatus::Failed)) |
| 3607 | (curRecording && |
| 3608 | (curRecording->GetRecordingStatus() == RecStatus::Failed || |
| 3609 | curRecording->GetRecordingStatus() == RecStatus::Failing))) |
3607 | 3610 | { |
3608 | 3611 | stateChangeLock.unlock(); |
3609 | 3612 | TeardownRecorder(request.flags); |
3610 | 3613 | stateChangeLock.lock(); |
3611 | | ClearFlags(kFlagRecorderRunning, __FILE__, __LINE__); |
3612 | 3614 | } |
3613 | 3615 | // At this point the recorders are shut down |
3614 | 3616 | |