|
@@ -131,12 +131,14 @@ export class VDecoder extends EventEmitter {
|
|
|
this.decode(nextFrame, tempId);
|
|
|
} else {
|
|
|
const clip = this.tempVideos.find(({ id }) => id === this.decodingId);
|
|
|
- const fps = (1000 / (Date.now() - this.start)) * clip.data.length;
|
|
|
- console.log(
|
|
|
- `Decoded ${clip.data.length} frames in ${Date.now() - this.start}ms @ ${
|
|
|
- fps >> 0
|
|
|
- }FPS`
|
|
|
- );
|
|
|
+ if (clip) {
|
|
|
+ const fps = (1000 / (Date.now() - this.start)) * clip.data.length;
|
|
|
+ console.log(
|
|
|
+ `Decoded ${clip.data.length} frames in ${
|
|
|
+ Date.now() - this.start
|
|
|
+ }ms @ ${fps >> 0}FPS`
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
this.decoding = false;
|
|
|
this.decodingId = null;
|