Skip to content
Browse files

Refs #10490. At least a partial LiveTV startup fix.

When we call FinishedRecording() early it appears to cause an extra empty
file to be generated at least some of the time. I'm not exactly sure how
this happens, but calling FinishedRecording before the recording is finished
is actually a bug itself. This fixes this in the case where I was able to

reproduce the problem Peter Townsend experienced. I also tried some other
LiveTV actions without seeing duplicate FinishedRecordings calls, but I
may have missed some code paths.
  • Loading branch information
daniel-kristjansson committed Mar 30, 2012
1 parent 7d1cd5f commit 84bc8008769f25e256f04270c5535421e26cb40a
Showing with 5 additions and 9 deletions.
  1. +5 −9 mythtv/libs/libmythtv/tv_rec.cpp
@@ -4437,14 +4437,7 @@ bool TVRec::SwitchLiveTVRingBuffer(const QString & channum,
return false;

ProgramInfo *pi = tvchain->GetProgramAt(-1);
if (pi)
RecordingInfo *oldinfo = new RecordingInfo(*pi);
delete pi;
FinishedRecording(oldinfo, NULL);
delete oldinfo;
QString oldcardtype = tvchain->GetCardType(-1);

pginfo->MarkAsInUse(true, kRecorderInUseID);
@@ -4462,8 +4455,11 @@ bool TVRec::SwitchLiveTVRingBuffer(const QString & channum,
else if (!set_rec)
if (curRecording)
// dummy recordings are finished before this
// is called and other recordings must be finished..
if (curRecording && oldcardtype != "DUMMY")
FinishedRecording(curRecording, NULL);
curRecording->MarkAsInUse(false, kRecorderInUseID);
delete curRecording;

0 comments on commit 84bc800

Please sign in to comment.
You can’t perform that action at this time.