From 3cffcab1a23e6efd538a7eeb1f467b9a2d4cd2b8 Mon Sep 17 00:00:00 2001 From: lxlxlxlx23 <11593136+lxlxlxlx23@user.noreply.gitee.com> Date: Thu, 9 Feb 2023 07:32:30 +0000 Subject: [PATCH] amend chn limit Signed-off-by: lxlxlxlx23 <11593136+lxlxlxlx23@user.noreply.gitee.com> --- cplusplus/level1_single_api/7_dvpp/vdec_sample/src/Vdec.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cplusplus/level1_single_api/7_dvpp/vdec_sample/src/Vdec.cpp b/cplusplus/level1_single_api/7_dvpp/vdec_sample/src/Vdec.cpp index 3c6326be3..5a447b14d 100644 --- a/cplusplus/level1_single_api/7_dvpp/vdec_sample/src/Vdec.cpp +++ b/cplusplus/level1_single_api/7_dvpp/vdec_sample/src/Vdec.cpp @@ -1191,8 +1191,8 @@ int32_t check_option() __FUNCTION__, __LINE__, g_is_write_file); return HI_FAILURE; } - // Check channel number[1, 96] - if ((g_chn_num > 96) || (g_chn_num < 1)) { + // Check channel number > 0 + if (g_chn_num < 1) { printf("[%s][%d] chan num is invalid, chan num = %u \n", __FUNCTION__, __LINE__, g_chn_num); return HI_FAILURE; } @@ -1213,7 +1213,7 @@ int32_t check_option() return HI_FAILURE; } // Check channel start number - if (g_start_chn_num + g_chn_num >= VDEC_MAX_CHN_NUM) { + if (g_start_chn_num + g_chn_num > VDEC_MAX_CHN_NUM) { printf("[%s][%d] start chan num is invalid, start chan num = %u \n", __FUNCTION__, __LINE__, g_start_chn_num); return HI_FAILURE; } -- Gitee