fix: validate codecClass in newTask function to prevent errors

This commit is contained in:
zurdi
2025-12-23 15:09:26 +00:00
parent f24d374b8d
commit c4c3867e5a

View File

@@ -36,6 +36,9 @@
},
f = {};
function h(t) {
if (typeof c[t.codecClass] !== 'function') {
throw new Error("Invalid codecClass");
}
var e = c[t.codecClass],
r = t.sn;
if (f[r]) throw Error("duplicated sn");