mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 13:53:53 +02:00
Remove superfluous end pos seeks, fix validation bug
This commit is contained in:
@@ -1332,8 +1332,6 @@ export class MatroskaMuxer extends Muxer {
|
|||||||
this.ebmlWriter.writeEBML(this.cues);
|
this.ebmlWriter.writeEBML(this.cues);
|
||||||
|
|
||||||
if (!this.format._options.appendOnly) {
|
if (!this.format._options.appendOnly) {
|
||||||
const endPos = this.writer.getPos();
|
|
||||||
|
|
||||||
// Write the Segment size
|
// Write the Segment size
|
||||||
const segmentSize = this.writer.getPos() - this.segmentDataOffset;
|
const segmentSize = this.writer.getPos() - this.segmentDataOffset;
|
||||||
this.writer.seek(this.ebmlWriter.offsets.get(this.segment!)! + 4);
|
this.writer.seek(this.ebmlWriter.offsets.get(this.segment!)! + 4);
|
||||||
@@ -1352,8 +1350,6 @@ export class MatroskaMuxer extends Muxer {
|
|||||||
this.writer.seek(this.ebmlWriter.offsets.get(this.seekHead)!);
|
this.writer.seek(this.ebmlWriter.offsets.get(this.seekHead)!);
|
||||||
this.maybeCreateSeekHead(true);
|
this.maybeCreateSeekHead(true);
|
||||||
this.ebmlWriter.writeEBML(this.seekHead);
|
this.ebmlWriter.writeEBML(this.seekHead);
|
||||||
|
|
||||||
this.writer.seek(endPos);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
release();
|
release();
|
||||||
|
|||||||
@@ -164,8 +164,6 @@ export class Mp3Muxer extends Muxer {
|
|||||||
this.format._options.onXingFrame(data, start);
|
this.format._options.onXingFrame(data, start);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.writer.seek(endPos);
|
|
||||||
|
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ export abstract class Target {
|
|||||||
onfinalized: (() => unknown) | null = null;
|
onfinalized: (() => unknown) | null = null;
|
||||||
|
|
||||||
slice(offset: number) {
|
slice(offset: number) {
|
||||||
if (!Number.isInteger(offset) && offset < 0) {
|
if (!Number.isInteger(offset) || offset < 0) {
|
||||||
throw new TypeError('offset must be a non-negative integer.');
|
throw new TypeError('offset must be a non-negative integer.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -369,8 +369,6 @@ export class WaveMuxer extends Muxer {
|
|||||||
this.riffWriter.writeU32(this.dataSize);
|
this.riffWriter.writeU32(this.dataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.writer.seek(endPos);
|
|
||||||
|
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,4 +7,3 @@ Also, why not just have the packet metadata on the packet? I think that would ma
|
|||||||
- Add an HLS "live mode". Challenge, where does bitrate come from?
|
- Add an HLS "live mode". Challenge, where does bitrate come from?
|
||||||
|
|
||||||
- fmp4 muxing (CMAF??)
|
- fmp4 muxing (CMAF??)
|
||||||
- ext-x-i-frames-only writing
|
|
||||||
Reference in New Issue
Block a user