Hotfix again: 剪辑的时间戳炸了

This commit is contained in:
Genteure 2018-03-31 13:58:57 +08:00
parent 3825dc038f
commit d58d989530

View File

@ -26,7 +26,7 @@ namespace BililiveRecorder.FlvProcessor
Buffer.BlockCopy(size, 1, tag, 1, 3);
byte[] timing = new byte[4];
Buffer.BlockCopy(BitConverter.GetBytes(TimeStamp - offset).ToBE(), 0, timing, 0, timing.Length);
Buffer.BlockCopy(BitConverter.GetBytes(Math.Max(0, TimeStamp - offset)).ToBE(), 0, timing, 0, timing.Length);
Buffer.BlockCopy(timing, 1, tag, 4, 3);
Buffer.BlockCopy(timing, 0, tag, 7, 1);