Skip to content

Commit 502af93

Browse files
committed
Small fixes here and there
1 parent 33a7deb commit 502af93

6 files changed

Lines changed: 17 additions & 12 deletions

File tree

res/index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,21 @@
200200
continue;
201201
} else if (!elem) continue;
202202

203-
if (elem.tagName == 'INPUT' || elem.tagName == 'SELECT') {
203+
if (elem.tagName == 'INPUT') {
204204
elem.value = dec[key];
205205
if (elem.type == 'range') {
206206
var valElem = document.getElementById(elem.id + '_val');
207207
if (valElem) valElem.innerHTML = dec[key];
208208
}
209209
if (typeof updateOsdSummary === 'function' && (elem.id.indexOf('_text') > -1 || elem.id.indexOf('_img') > -1))
210210
updateOsdSummary(elem.id);
211+
} else if (elem.tagName == 'SELECT') {
212+
for (var i = 0; i < elem.options.length; i++) {
213+
if (elem.options[i].value == dec[key] + '') {
214+
elem.selectedIndex = i;
215+
break;
216+
}
217+
}
211218
} else {
212219
elem.innerHTML = dec[key];
213220
}

src/app_config.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,10 @@ enum ConfigError parse_app_config(void) {
446446
int count, val;
447447
parse_int(&ini, "stream", "udp_srcport", 0, USHRT_MAX, &val);
448448
if (err != CONFIG_OK) app_config.stream_udp_srcport = (unsigned short)val;
449-
err = parse_list(&ini, "stream", "dest",
449+
parse_list(&ini, "stream", "dest",
450450
sizeof(app_config.stream_dests) / sizeof(*app_config.stream_dests),
451451
&count, app_config.stream_dests);
452452
*app_config.stream_dests[count] = '\0';
453-
if (err != CONFIG_OK)
454-
goto RET_ERR;
455453
}
456454

457455
parse_bool(&ini, "audio", "enable", &app_config.audio_enable);

src/hal/hisi/v1_vpss.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ typedef struct {
4141
int (*fnCreateGroup)(int group, v1_vpss_grp *config);
4242
int (*fnDestroyGroup)(int group);
4343
int (*fnResetGroup)(int group);
44-
int (*fnSetGroupConfig)(int channel, v1_vpss_grp *config);
44+
int (*fnSetGroupConfig)(int group, v1_vpss_grp *config);
4545
int (*fnStartGroup)(int group);
4646
int (*fnStopGroup)(int group);
4747

@@ -94,7 +94,7 @@ static int v1_vpss_load(v1_vpss_impl *vpss_lib) {
9494
if (!(vpss_lib->fnSetChannelMode = (int(*)(int group, int channel, v1_vpss_mode *config))
9595
hal_symbol_load("v1_vpss", vpss_lib->handle, "HI_MPI_VPSS_SetChnMode")))
9696
return EXIT_FAILURE;
97-
97+
9898
return EXIT_SUCCESS;
9999
}
100100

src/hal/hisi/v2_vpss.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ typedef struct {
4040
int (*fnCreateGroup)(int group, v2_vpss_grp *config);
4141
int (*fnDestroyGroup)(int group);
4242
int (*fnResetGroup)(int group);
43-
int (*fnSetGroupConfig)(int channel, v2_vpss_grp *config);
43+
int (*fnSetGroupConfig)(int group, v2_vpss_grp *config);
4444
int (*fnStartGroup)(int group);
4545
int (*fnStopGroup)(int group);
4646

@@ -93,7 +93,7 @@ static int v2_vpss_load(v2_vpss_impl *vpss_lib) {
9393
if (!(vpss_lib->fnSetChannelMode = (int(*)(int group, int channel, v2_vpss_mode *config))
9494
hal_symbol_load("v2_vpss", vpss_lib->handle, "HI_MPI_VPSS_SetChnMode")))
9595
return EXIT_FAILURE;
96-
96+
9797
return EXIT_SUCCESS;
9898
}
9999

src/hal/hisi/v3_vpss.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ typedef struct {
4141
int (*fnCreateGroup)(int group, v3_vpss_grp *config);
4242
int (*fnDestroyGroup)(int group);
4343
int (*fnResetGroup)(int group);
44-
int (*fnSetGroupConfig)(int channel, v3_vpss_grp *config);
44+
int (*fnSetGroupConfig)(int group, v3_vpss_grp *config);
4545
int (*fnStartGroup)(int group);
4646
int (*fnStopGroup)(int group);
4747

@@ -94,7 +94,7 @@ static int v3_vpss_load(v3_vpss_impl *vpss_lib) {
9494
if (!(vpss_lib->fnSetChannelMode = (int(*)(int group, int channel, v3_vpss_mode *config))
9595
hal_symbol_load("v3_vpss", vpss_lib->handle, "HI_MPI_VPSS_SetChnMode")))
9696
return EXIT_FAILURE;
97-
97+
9898
return EXIT_SUCCESS;
9999
}
100100

src/hal/hisi/v4_vpss.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ typedef struct {
5454
int (*fnCreateGroup)(int group, v4_vpss_grp *config);
5555
int (*fnDestroyGroup)(int group);
5656
int (*fnResetGroup)(int group);
57-
int (*fnSetGroupConfig)(int channel, v4_vpss_grp *config);
57+
int (*fnSetGroupConfig)(int group, v4_vpss_grp *config);
5858
int (*fnStartGroup)(int group);
5959
int (*fnStopGroup)(int group);
6060

@@ -105,7 +105,7 @@ static int v4_vpss_load(v4_vpss_impl *vpss_lib) {
105105
if (!(vpss_lib->fnSetChannelConfig = (int(*)(int group, int channel, v4_vpss_chn *config))
106106
hal_symbol_load("v4_vpss", vpss_lib->handle, "HI_MPI_VPSS_SetChnAttr")))
107107
return EXIT_FAILURE;
108-
108+
109109
return EXIT_SUCCESS;
110110
}
111111

0 commit comments

Comments
 (0)