Merge branch 'master' into m3u-update

This commit is contained in:
Trek H 2020-01-21 11:51:31 +10:30
commit 461ff32cc6
1 changed files with 6 additions and 6 deletions

View File

@ -1,12 +1,9 @@
/*
NAME
lex-mjpeg.js
AUTHOR
Trek Hopton <trek@ausocean.org>
LICENSE
This file is Copyright (C) 2019 the Australian Ocean Lab (AusOcean)
This file is Copyright (C) 2020 the Australian Ocean Lab (AusOcean)
It is free software: you can redistribute it and/or modify them
under the terms of the GNU General Public License as published by the
@ -24,11 +21,14 @@ LICENSE
// MJPEGLexer lexes a byte array containing MJPEG into individual JPEGs.
class MJPEGLexer {
constructor(src) {
this.src = src;
constructor() {
this.off = 0;
}
append(data) {
this.src = new Uint8Array(data);
}
// read returns the next single frame.
read() {
// Check if the src can contain at least the start and end flags (4B).