Bufferize reading

This commit is contained in:
Yohann D'ANELLO 2020-11-08 15:29:18 +01:00
parent 8427377d51
commit 4f947ad651
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ func ingest(name string, q *messaging.Quality) {
return
}
// Start ffmpag to convert videoInput to audio UDP
// Start ffmpeg to convert videoInput to audio UDP
ffmpeg, ffmpegOut, err := startFFmpeg(videoInput, firstPort)
if err != nil {
log.Printf("Error while starting ffmpeg: %s", err)
@ -40,7 +40,7 @@ func ingest(name string, q *messaging.Quality) {
// Receive video
go func() {
h264, _ := h264reader.NewReader(*ffmpegOut)
h264, _ := h264reader.NewReader(bufio.NewReader(*ffmpegOut))
var spsAndPpsCache []byte
for {