Merged
【PR】【fix】:修复pyacl构建错误 #4924
wuqifanAdd on Sep 14
【PR】【fix】:修复pyacl构建错误 #4924
Merged
Merged fromweixin_46600764/runtimemasterintocann/runtimemaster
Total: 1 files changed+2-2
| @@ -1214,7 +1214,7 @@ static bool GetVencJpegHuffmanParamFromPydict(PyObject* pyDict, hi_venc_jpeg_huf | |||
| 1214 | PyObject* pyDcTables = PyDict_GetItemString(pyDict, "dc_tables"); | 1214 | PyObject* pyDcTables = PyDict_GetItemString(pyDict, "dc_tables"); |
| 1215 | CHECK_BOOL( | 1215 | CHECK_BOOL( |
| 1216 | pyDcTables != nullptr && PyList_Check(pyDcTables) != 0, "the dc_tables argument is missing or not a list", | 1216 | pyDcTables != nullptr && PyList_Check(pyDcTables) != 0, "the dc_tables argument is missing or not a list", |
| 1217 | - PyErr_ValueError); | 1217 | + PyExc_TypeError); |
| 1218 | int len = static_cast<int>(PyList_Size(pyDcTables)); | 1218 | int len = static_cast<int>(PyList_Size(pyDcTables)); |
| 1219 | for (int i = 0; i < len; i++) { | 1219 | for (int i = 0; i < len; i++) { |
| 1220 | CHECK_BOOL(GetVencHuffmanDcTableFromPydict(PyList_GetItem(pyDcTables, i), param.dc_tables[i])); | 1220 | CHECK_BOOL(GetVencHuffmanDcTableFromPydict(PyList_GetItem(pyDcTables, i), param.dc_tables[i])); |
| @@ -1223,7 +1223,7 @@ static bool GetVencJpegHuffmanParamFromPydict(PyObject* pyDict, hi_venc_jpeg_huf | |||
| 1223 | PyObject* pyAcTables = PyDict_GetItemString(pyDict, "ac_tables"); | 1223 | PyObject* pyAcTables = PyDict_GetItemString(pyDict, "ac_tables"); |
| 1224 | CHECK_BOOL( | 1224 | CHECK_BOOL( |
| 1225 | pyAcTables != nullptr && PyList_Check(pyAcTables) != 0, "the ac_tables argument is missing or not a list", | 1225 | pyAcTables != nullptr && PyList_Check(pyAcTables) != 0, "the ac_tables argument is missing or not a list", |
| 1226 | - PyErr_ValueError); | 1226 | + PyExc_TypeError); |
| 1227 | len = static_cast<int>(PyList_Size(pyAcTables)); | 1227 | len = static_cast<int>(PyList_Size(pyAcTables)); |
| 1228 | for (int i = 0; i < len; i++) { | 1228 | for (int i = 0; i < len; i++) { |
| 1229 | CHECK_BOOL(GetVencHuffmanAcTableFromPydict(PyList_GetItem(pyAcTables, i), param.ac_tables[i])); | 1229 | CHECK_BOOL(GetVencHuffmanAcTableFromPydict(PyList_GetItem(pyAcTables, i), param.ac_tables[i])); |