Fixing some syntax errors

This commit is contained in:
Saxon1 2018-04-19 13:42:36 +09:30
parent ab2fef756f
commit 60163e007d
2 changed files with 2 additions and 11 deletions

View File

@ -75,7 +75,6 @@ const (
Mpegts = 9 Mpegts = 9
Rtmp = 10 Rtmp = 10
Ffmpeg = 11 Ffmpeg = 11
Revid = 12
Flv = 13 Flv = 13
LibRtmp = 14 LibRtmp = 14
QuantizationOn = 15 QuantizationOn = 15
@ -83,6 +82,7 @@ const (
Yes = 17 Yes = 17
No = 18 No = 18
NativeRtmp = 19 NativeRtmp = 19
FfmpegRtmp = 20
) )
// Default config settings // Default config settings
@ -189,16 +189,6 @@ func (config *Config) Validate(r *revid) error {
return errors.New("Bad output type defined in config!") return errors.New("Bad output type defined in config!")
} }
switch config.RtmpMethod {
case LibRtmp:
case Ffmpeg:
case NothingDefined:
r.Log(Warning, "No RTMP encoding method defined, defautling to ffmpeg!")
config.RtmpEncodingMethod = Ffmpeg
default:
return errors.New("Bad rtmp method defined in config!")
}
switch config.Packetization { switch config.Packetization {
case None: case None:
case Mpegts: case Mpegts:

View File

@ -300,6 +300,7 @@ func (r *revid) packClips() {
packetCount := 0 packetCount := 0
for { for {
// Get some memory from the ring buffer for out clip // Get some memory from the ring buffer for out clip
var clip []byte
if clip, err := r.ringBuffer.Get(); err != nil { if clip, err := r.ringBuffer.Get(); err != nil {
r.Log(Error, err.Error()) r.Log(Error, err.Error())
r.Log(Warning, "Clearing output chan!") r.Log(Warning, "Clearing output chan!")