mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 05:43:50 +02:00
Multiple miscellaneous fixes
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
||||
binarySearchLessOrEqual,
|
||||
COLOR_PRIMARIES_MAP_INVERSE,
|
||||
findLastIndex,
|
||||
isIso639Dash2LanguageCode,
|
||||
last,
|
||||
MATRIX_COEFFICIENTS_MAP_INVERSE,
|
||||
Rotation,
|
||||
@@ -749,6 +750,10 @@ export class MatroskaDemuxer extends Demuxer {
|
||||
if (!this.currentTrack) break;
|
||||
|
||||
this.currentTrack.languageCode = reader.readString(size);
|
||||
|
||||
if (!isIso639Dash2LanguageCode(this.currentTrack.languageCode)) {
|
||||
this.currentTrack.languageCode = UNDETERMINED_LANGUAGE;
|
||||
}
|
||||
}; break;
|
||||
|
||||
case EBMLId.Video: {
|
||||
|
||||
@@ -687,8 +687,8 @@ export class MatroskaMuxer extends Muxer {
|
||||
}
|
||||
|
||||
const relativeTimestamp = msTimestamp - this.currentClusterStartMsTimestamp!;
|
||||
if (relativeTimestamp < 0) {
|
||||
// The chunk lies outside of the current cluster
|
||||
if (relativeTimestamp < -(2 ** 15)) {
|
||||
// The block lies too far in the past, it's not representable within this cluster
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user