Fix segfault with mpv plugin (thx to @lnj at vdr-portal.de)

This fix prevents a segfault when using the mpv plugin because there are
no cutmarks.
This commit is contained in:
kamel5 2021-03-28 12:14:41 +02:00
parent 894b5865cd
commit 50879fa931
2 changed files with 5 additions and 3 deletions

View File

@ -313,8 +313,9 @@ void cViewReplay::SetProgressbar(int current, int total) {
}
void cViewReplay::SetMarks(const cMarks *marks, int current, int total) {
if (veCutMarks)
veCutMarks->Set(marks, current, total, timeShiftActive, timeShiftFramesTotal);
if (!veCutMarks)
return;
veCutMarks->Set(marks, current, total, timeShiftActive, timeShiftFramesTotal);
Render((int)eVeDisplayReplay::cutmarks);
}

View File

@ -45,7 +45,8 @@ void cSDDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
void cSDDisplayReplay::SetProgress(int Current, int Total) {
if (ok) {
view->SetProgressbar(Current, Total);
view->SetMarks(marks, Current, Total);
if (marks)
view->SetMarks(marks, Current, Total);
view->SetTimeshiftTimes(Current, Total);
view->SetEndTime(Current, Total);
view->DelayOnPause();