Skip to content

Commit

Permalink
Increase adts.js test coverage to 100% (#2053)
Browse files Browse the repository at this point in the history
* Increase adts.js test coverage to 100%
  • Loading branch information
springuper authored and johnBartos committed Jan 22, 2019
1 parent 3fd4e2a commit d8be3dc
Show file tree
Hide file tree
Showing 2 changed files with 419 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/demux/adts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* ADTS parser helper
* ADTS parser helper
* @link https://wiki.multimedia.cx/index.php?title=ADTS
*/
import { logger } from '../utils/logger';
import { ErrorTypes, ErrorDetails } from '../errors';
Expand Down Expand Up @@ -160,7 +161,7 @@ export function isHeader (data, offset) {
export function probe (data, offset) {
// same as isHeader but we also check that ADTS frame follows last ADTS frame
// or end of data is reached
if (offset + 1 < data.length && isHeaderPattern(data, offset)) {
if (isHeader(data, offset)) {
// ADTS header Length
let headerLength = getHeaderLength(data, offset);
// ADTS frame Length
Expand Down

0 comments on commit d8be3dc

Please sign in to comment.