Sfoglia il codice sorgente

Update FlvEncoder.cs

处理视频头部创建异常
tags/v1.1.0
逐浪人 5 anni fa
committed by GitHub
parent
commit
45a528a199
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. +5
    -1
      src/JT1078.Flv/FlvEncoder.cs

+ 5
- 1
src/JT1078.Flv/FlvEncoder.cs Vedi File

@@ -217,7 +217,11 @@ namespace JT1078.Flv
flvMessagePackWriter.WriteArray(flvHeader); flvMessagePackWriter.WriteArray(flvHeader);
// always 0 // always 0
flvMessagePackWriter.WriteUInt32(0); flvMessagePackWriter.WriteUInt32(0);
//解析sps
//解析sps
if (sps == null)
{
return null;
}
var rawData = h264Decoder.DiscardEmulationPreventionBytes(sps.RawData); var rawData = h264Decoder.DiscardEmulationPreventionBytes(sps.RawData);
ExpGolombReader h264GolombReader = new ExpGolombReader(rawData); ExpGolombReader h264GolombReader = new ExpGolombReader(rawData);
SPSInfo spsInfo = h264GolombReader.ReadSPS(); SPSInfo spsInfo = h264GolombReader.ReadSPS();


Caricamento…
Annulla
Salva