From f5087512eb220b9a4a073618f4c16917a4b7689a Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Mon, 30 Dec 2019 15:36:51 +0000 Subject: [PATCH] Fix resuming recording directly after stopping it If a recording is playing and the user presses stop, then play the recording is started from the beginning. Caused by commit fa854a3abe995de8e3a06c422a535fc0e4a8484a. --- vrecordinglist.cc | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/vrecordinglist.cc b/vrecordinglist.cc index bf28e7f..c9059f7 100644 --- a/vrecordinglist.cc +++ b/vrecordinglist.cc @@ -191,6 +191,28 @@ int VRecordingList::doPlay(bool resume) if (toPlay) { + toPlay->loadRecInfo(); + + if (toPlay->recInfo == NULL) + { + VInfo* vi = new VInfo(); + vi->setSize(360, 200); + vi->createBuffer(); + if (Video::getInstance()->getFormat() == Video::PAL) + vi->setPosition(190, 170); + else + vi->setPosition(180, 120); + vi->setOneLiner(tr("Error playing recording")); + vi->setExitable(); + vi->setBorderOn(1); + vi->setTitleBarColour(DrawStyle::DANGER); + vi->okButton(); + vi->draw(); + boxstack->add(vi); + boxstack->update(vi); + return 0; + } + toPlay->loadMarks(); bool ish264; bool isRadio = toPlay->isRadio(ish264); @@ -247,28 +269,6 @@ int VRecordingList::doPlay(bool resume) } else { - toPlay->loadRecInfo(); - - if (toPlay->recInfo == NULL) - { - VInfo* vi = new VInfo(); - vi->setSize(360, 200); - vi->createBuffer(); - if (Video::getInstance()->getFormat() == Video::PAL) - vi->setPosition(190, 170); - else - vi->setPosition(180, 120); - vi->setOneLiner(tr("Error playing recording")); - vi->setExitable(); - vi->setBorderOn(1); - vi->setTitleBarColour(DrawStyle::DANGER); - vi->okButton(); - vi->draw(); - boxstack->add(vi); - boxstack->update(vi); - return 0; - } - VVideoRec* vidrec = new VVideoRec(toPlay, ish264); vidrec->draw(); boxstack->add(vidrec); -- 2.39.5