mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-01-31 01:33:00 +00:00
Bufferize reading
This commit is contained in:
parent
8427377d51
commit
4f947ad651
@ -31,7 +31,7 @@ func ingest(name string, q *messaging.Quality) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start ffmpag to convert videoInput to audio UDP
|
// Start ffmpeg to convert videoInput to audio UDP
|
||||||
ffmpeg, ffmpegOut, err := startFFmpeg(videoInput, firstPort)
|
ffmpeg, ffmpegOut, err := startFFmpeg(videoInput, firstPort)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error while starting ffmpeg: %s", err)
|
log.Printf("Error while starting ffmpeg: %s", err)
|
||||||
@ -40,7 +40,7 @@ func ingest(name string, q *messaging.Quality) {
|
|||||||
|
|
||||||
// Receive video
|
// Receive video
|
||||||
go func() {
|
go func() {
|
||||||
h264, _ := h264reader.NewReader(*ffmpegOut)
|
h264, _ := h264reader.NewReader(bufio.NewReader(*ffmpegOut))
|
||||||
var spsAndPpsCache []byte
|
var spsAndPpsCache []byte
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user