Add displayAspectWidth/displayAspectHeight only when they are necessary

This commit is contained in:
Vanilagy
2026-03-19 12:25:19 +01:00
parent 92ea645df4
commit 1da96f6d69
4 changed files with 32 additions and 10 deletions
+8 -2
View File
@@ -1514,10 +1514,16 @@ class MpegTsVideoTrackBacking extends MpegTsTrackBacking implements InputVideoTr
}),
codedWidth: this.elementaryStream.info.width,
codedHeight: this.elementaryStream.info.height,
displayAspectWidth: this.elementaryStream.info.squarePixelWidth,
displayAspectHeight: this.elementaryStream.info.squarePixelHeight,
colorSpace: this.elementaryStream.info.colorSpace,
};
if (
this.elementaryStream.info.width !== this.elementaryStream.info.squarePixelWidth
|| this.elementaryStream.info.height !== this.elementaryStream.info.squarePixelHeight
) {
this.decoderConfig.displayAspectWidth = this.elementaryStream.info.squarePixelWidth;
this.decoderConfig.displayAspectHeight = this.elementaryStream.info.squarePixelHeight;
}
}
override getCodec(): VideoCodec {