mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 07:06:51 +08:00
Update CI configs to v0.7.2
Update lint scripts and CI configs.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
//go:build !js
|
||||
// +build !js
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
@@ -217,16 +219,17 @@ func main() {
|
||||
frame, _, err = ivf.ParseNextFrame()
|
||||
}
|
||||
|
||||
switch err {
|
||||
switch {
|
||||
// If we have reached the end of the file start again
|
||||
case errors.Is(err, io.EOF):
|
||||
ivf.ResetReader(setReaderFile(qualityLevels[currentQuality].fileName))
|
||||
|
||||
// No error write the video frame
|
||||
case nil:
|
||||
case err == nil:
|
||||
currentTimestamp = frameHeader.Timestamp
|
||||
if err = videoTrack.WriteSample(media.Sample{Data: frame, Duration: time.Second}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
// If we have reached the end of the file start again
|
||||
case io.EOF:
|
||||
ivf.ResetReader(setReaderFile(qualityLevels[currentQuality].fileName))
|
||||
// Error besides io.EOF that we dont know how to handle
|
||||
default:
|
||||
panic(err)
|
||||
|
Reference in New Issue
Block a user