Fixing array indexing

This commit is contained in:
Saxon1 2018-04-19 17:49:36 +09:30
parent 748dad2a91
commit 2abcc6fb76
1 changed files with 8 additions and 7 deletions

View File

@ -30,8 +30,9 @@ package main
import ( import (
"flag" "flag"
"strconv" "strconv"
"bitbucket.org/ausocean/av/revid" "time"
"bitbucket.org/ausocean/av/revid"
"bitbucket.org/ausocean/IoT/pi/netsender" "bitbucket.org/ausocean/IoT/pi/netsender"
) )
@ -41,7 +42,7 @@ const (
inputCodecPtr = 1 inputCodecPtr = 1
outputPtr = 2 outputPtr = 2
rtmpMethodPtr = 3 rtmpMethodPtr = 3
packetisationPtr = 4 packetizationPtr = 4
quantizationModePtr = 5 quantizationModePtr = 5
verbosityPtr = 6 verbosityPtr = 6
framesPerClipPrt = 7 framesPerClipPrt = 7
@ -62,7 +63,7 @@ const (
const ( const (
sleepTime = 2 * 43200 sleepTime = 2 * 43200
defaultRunDuration = 2 * 43200 defaultRunDuration = 2 * 43200
noOfConfigconfigFlags = 20 noOfConfigconfigFlags = 21
revidStopTime = 5 revidStopTime = 5
) )
@ -143,14 +144,14 @@ func main() {
switch *configFlags[packetisationPtr] { switch *configFlags[packetisationPtr] {
case "None": case "None":
config.Packetisation = revid.None config.Packetization = revid.None
case "Rtp": case "Rtp":
config.Packetisation = revid.Rtp config.Packetization = revid.Rtp
case "Flv": case "Flv":
config.Packetisation = revid.Flv config.Packetization = revid.Flv
} }
switch *configFlags[quantisationModePtr] { switch *configFlags[quantizationModePtr] {
case "QuantizationOn": case "QuantizationOn":
config.Quantization = revid.QuantizationOn config.Quantization = revid.QuantizationOn
case "QuantizationOff": case "QuantizationOff":