Fix too small OSD Buffer

This commit is contained in:
jojo61 2025-02-09 13:15:40 +01:00
parent f3ae69042f
commit ad99776be8
2 changed files with 7 additions and 5 deletions

View File

@ -61,7 +61,7 @@ extern void ToggleLUT();
/// vdr-plugin version number. /// vdr-plugin version number.
/// Makefile extracts the version number for generating the file name /// Makefile extracts the version number for generating the file name
/// for the distribution archive. /// for the distribution archive.
static const char *const VERSION = "3.28" static const char *const VERSION = "3.29"
#ifdef GIT_REV #ifdef GIT_REV
"-GIT" GIT_REV "-GIT" GIT_REV
#endif #endif
@ -1526,8 +1526,8 @@ void cMenuSetupSoft::Store(void) {
SetupStore("DetachFromMainMenu", ConfigDetachFromMainMenu = DetachFromMainMenu); SetupStore("DetachFromMainMenu", ConfigDetachFromMainMenu = DetachFromMainMenu);
switch (OsdSize) { switch (OsdSize) {
case 0: case 0:
OsdWidth = 0; OsdWidth = 1920;
OsdHeight = 0; OsdHeight = 1080;
break; break;
case 1: case 1:
OsdWidth = 1920; OsdWidth = 1920;

View File

@ -5383,8 +5383,10 @@ void VideoOsdInit(void) {
// printf("\nset osd %d x %d\n",OsdWidth,OsdHeight); // printf("\nset osd %d x %d\n",OsdWidth,OsdHeight);
if (posd) if (posd)
free(posd); free(posd);
posd = (unsigned char *)calloc((OsdWidth + 1) * (OsdHeight + 1) * 4, 1); if (OsdWidth >= 1920 && OsdHeight >= 1080)
// posd = (unsigned char *)calloc((4096 + 1) * (2160 + 1) * 4, 1); posd = (unsigned char *)calloc((OsdWidth + 1) * (OsdHeight + 1) * 4, 1);
else
posd = (unsigned char *)calloc((4096 + 1) * (2160 + 1) * 4, 1);
VideoOsdClear(); VideoOsdClear();
} }