mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Added missing locks to SetMenuItem() functions
This commit is contained in:
parent
8c3671fae6
commit
988d5aebfa
3
HISTORY
3
HISTORY
@ -10034,7 +10034,7 @@ Video Disk Recorder Revision History
|
||||
(suggested by Stefan Hofmann).
|
||||
- Added vdrrootdir and incdir to vdr.pc (thanks to Stefan Hofmann).
|
||||
|
||||
2025-02-19:
|
||||
2025-02-20:
|
||||
|
||||
- Removed all DEPRECATED_* code.
|
||||
- Fixed error checking in case the fps value can't be determined by the frame parser.
|
||||
@ -10087,3 +10087,4 @@ Video Disk Recorder Revision History
|
||||
Baierl).
|
||||
- Fixed spurious fast frames when switching from "slow back" to "slow forward".
|
||||
- Fixed cPtsIndex::FindFrameNumber() to handle the case where Pts points to an I-frame.
|
||||
- Added missing locks to SetMenuItem() functions.
|
||||
|
7
menu.c
7
menu.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menu.c 5.21 2025/02/17 10:49:10 kls Exp $
|
||||
* $Id: menu.c 5.22 2025/02/20 10:23:15 kls Exp $
|
||||
*/
|
||||
|
||||
#include "menu.h"
|
||||
@ -342,6 +342,7 @@ void cMenuChannelItem::Set(void)
|
||||
|
||||
void cMenuChannelItem::SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable)
|
||||
{
|
||||
LOCK_CHANNELS_READ;
|
||||
if (!DisplayMenu->SetItemChannel(channel, Index, Current, Selectable, sortMode == csmProvider))
|
||||
DisplayMenu->SetItem(Text(), Index, Current, Selectable);
|
||||
}
|
||||
@ -1293,6 +1294,7 @@ void cMenuTimerItem::Set(void)
|
||||
|
||||
void cMenuTimerItem::SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable)
|
||||
{
|
||||
LOCK_TIMERS_READ;
|
||||
if (!DisplayMenu->SetItemTimer(timer, Index, Current, Selectable))
|
||||
DisplayMenu->SetItem(Text(), Index, Current, Selectable);
|
||||
}
|
||||
@ -1633,6 +1635,8 @@ bool cMenuScheduleItem::Update(const cTimers *Timers, bool Force)
|
||||
|
||||
void cMenuScheduleItem::SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable)
|
||||
{
|
||||
LOCK_CHANNELS_READ;
|
||||
LOCK_SCHEDULES_READ;
|
||||
if (!DisplayMenu->SetItemEvent(event, Index, Current, Selectable, channel, withDate, timerMatch, timerActive))
|
||||
DisplayMenu->SetItem(Text(), Index, Current, Selectable);
|
||||
}
|
||||
@ -3049,6 +3053,7 @@ void cMenuRecordingItem::IncrementCounter(bool New)
|
||||
|
||||
void cMenuRecordingItem::SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable)
|
||||
{
|
||||
LOCK_RECORDINGS_READ;
|
||||
if (!DisplayMenu->SetItemRecording(recording, Index, Current, Selectable, level, totalEntries, newEntries))
|
||||
DisplayMenu->SetItem(Text(), Index, Current, Selectable);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user