fixing syntax errors

This commit is contained in:
Saxon1 2018-05-06 16:57:01 +09:30
parent 5d7238f5b3
commit de7b80adfb
1 changed files with 4 additions and 3 deletions

View File

@ -102,8 +102,9 @@ func (p *h264Parser) parse() {
outputBuffer := make([]byte, 0, outputBufferSize) outputBuffer := make([]byte, 0, outputBufferSize)
searchingForEnd := false searchingForEnd := false
for p.isParsing { for p.isParsing {
var aByte uint8
if p.isParsing { if p.isParsing {
aByte := <-p.inputChan aByte = <-p.inputChan
} else { } else {
return return
} }
@ -111,7 +112,7 @@ func (p *h264Parser) parse() {
outputBuffer = append(outputBuffer, aByte) outputBuffer = append(outputBuffer, aByte)
for i := 1; aByte == 0x00 && i != 4; i++ { for i := 1; aByte == 0x00 && i != 4; i++ {
if p.isParsing { if p.isParsing {
aByte := <-p.inputChan aByte = <-p.inputChan
} else { } else {
return return
} }
@ -125,7 +126,7 @@ func (p *h264Parser) parse() {
searchingForEnd = false searchingForEnd = false
} }
if p.isParsing { if p.isParsing {
aByte := <-p.inputChan aByte = <-p.inputChan
} else { } else {
return return
} }