|
@@ -48,7 +48,10 @@ export class VDecoder extends EventEmitter {
|
|
|
switch (message.type) {
|
|
|
case "pictureReady":
|
|
|
// onPictureReady(message);
|
|
|
- console.log("[VDecoder]::decodeData", Object.assign(message, { clipId: this.decodingId }));
|
|
|
+ console.log(
|
|
|
+ "[VDecoder]::decodeData",
|
|
|
+ Object.assign(message, { clipId: this.decodingId })
|
|
|
+ );
|
|
|
this.emit(
|
|
|
"decodeData",
|
|
|
Object.assign(message, { clipId: this.decodingId })
|
|
@@ -86,6 +89,11 @@ export class VDecoder extends EventEmitter {
|
|
|
|
|
|
let rangeFetch = [];
|
|
|
|
|
|
+ if (rangeArray[0] < 0 || rangeArray[1] < 0) {
|
|
|
+ console.error("[VDecoder]:range: 非法", `${[rangeArray[0], rangeArray[1]]}`);
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
if (rangeArray[0] < rangeArray[1]) {
|
|
|
rangeFetch = range(rangeArray[0], rangeArray[1] + 1);
|
|
|
console.log("[VDecoder]:顺时 +", rangeFetch);
|