Skip to content

Commit

Permalink
Emit FRAG_PARSING_ERROR on unsupported M2TS codec (#6447)
Browse files Browse the repository at this point in the history
Fixes #6445

(cherry picked from commit 5d2f57c)
  • Loading branch information
robwalch committed May 24, 2024
1 parent 3e6987b commit a247d34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/demux/transmuxer-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ export default class TransmuxerInterface {
type: ErrorTypes.MEDIA_ERROR,
details: ErrorDetails.FRAG_PARSING_ERROR,
chunkMeta,
frag: this.frag || undefined,
fatal: false,
error,
err: error,
Expand Down
7 changes: 3 additions & 4 deletions src/demux/tsdemuxer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -872,11 +872,10 @@ function parsePMT(
case 0xc2: // SAMPLE-AES EC3
/* falls through */
case 0x87:
logger.warn('Unsupported EC-3 in M2TS found');
break;
throw new Error('Unsupported EC-3 in M2TS found');

case 0x24:
logger.warn('Unsupported HEVC in M2TS found');
break;
throw new Error('Unsupported HEVC in M2TS found');

default:
// logger.log('unknown stream type:' + data[offset]);
Expand Down

0 comments on commit a247d34

Please sign in to comment.