Fixes to better support Safari/MacOS/iOS playback of MP4 output

Co-authored-by: Marco van Dijk <marco@stronk.rocks>
Co-authored-by: Thulinma <jaron@vietors.com>
This commit is contained in:
Balder 2023-07-05 17:07:41 +02:00 committed by Thulinma
parent 963d7846a8
commit d63190387a
3 changed files with 42 additions and 18 deletions

View file

@ -2007,8 +2007,8 @@ namespace MP4{
TKHD::TKHD(const DTSC::Meta &M, size_t idx){
initialize();
setTrackID(idx + 1);
setDuration(-1);
if (M.getVod()){setDuration(M.getLastms(idx) - M.getFirstms(idx));}
setDuration(0);
if (!M.getLive()){setDuration(M.getLastms(idx) - M.getFirstms(idx));}
if (M.getType(idx) == "video"){
setWidth(M.getWidth(idx));
setHeight(M.getHeight(idx));
@ -2757,7 +2757,7 @@ namespace MP4{
setCLAP(avccBox);
}
if (tCodec == "HEVC"){
setCodec("hev1");
setCodec("hvc1");
MP4::HVCC hvccBox;
hvccBox.setPayload(M.getInit(idx));
setCLAP(hvccBox);