@@ -2204,13 +2204,16 @@ namespace Plugin {
2204
2204
{
2205
2205
LOGINFO (" Entry\n " );
2206
2206
tvDolbyMode_t dvModes[tvMode_Max];
2207
- tvDolbyMode_t *dvModesPtr = dvModes; // Pointer to statically allocated tvDolbyMode_t array
2207
+ tvDolbyMode_t *dvModesPtr[tvMode_Max];
2208
2208
unsigned short totalAvailable = 0 ;
2209
-
2209
+ for (int i = 0 ; i < tvMode_Max; i++)
2210
+ {
2211
+ dvModesPtr[i] = &dvModes[i];
2212
+ }
2210
2213
// Set an initial value to indicate the mode type
2211
2214
dvModes[0 ] = tvDolbyMode_Dark;
2212
2215
2213
- tvError_t ret = GetTVSupportedDolbyVisionModes (& dvModesPtr, &totalAvailable);
2216
+ tvError_t ret = GetTVSupportedDolbyVisionModes (dvModesPtr, &totalAvailable);
2214
2217
if (ret != tvERROR_NONE) {
2215
2218
returnResponse (false );
2216
2219
}
@@ -2423,9 +2426,14 @@ namespace Plugin {
2423
2426
uint32_t AVOutputTV::getSupportedPictureModes (const JsonObject& parameters, JsonObject& response)
2424
2427
{
2425
2428
LOGINFO (" Entry\n " );
2426
- pic_modes_t *pictureModes;
2429
+ pic_modes_t pictureModes[PIC_MODES_SUPPORTED_MAX];
2430
+ pic_modes_t *pictureModesPtr[PIC_MODES_SUPPORTED_MAX];
2427
2431
unsigned short totalAvailable = 0 ;
2428
- tvError_t ret = GetTVSupportedPictureModes (&pictureModes,&totalAvailable);
2432
+ for (int i = 0 ; i < PIC_MODES_SUPPORTED_MAX; i++)
2433
+ {
2434
+ pictureModesPtr[i] = &pictureModes[i];
2435
+ }
2436
+ tvError_t ret = GetTVSupportedPictureModes (pictureModesPtr,&totalAvailable);
2429
2437
if (ret != tvERROR_NONE) {
2430
2438
returnResponse (false );
2431
2439
}
0 commit comments