From de7b80adfbd9178013e8f8916c3890844906b461 Mon Sep 17 00:00:00 2001 From: Saxon1 Date: Sun, 6 May 2018 16:57:01 +0930 Subject: [PATCH] fixing syntax errors --- parser/H264Parser.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/parser/H264Parser.go b/parser/H264Parser.go index 21191717..3d116367 100644 --- a/parser/H264Parser.go +++ b/parser/H264Parser.go @@ -102,8 +102,9 @@ func (p *h264Parser) parse() { outputBuffer := make([]byte, 0, outputBufferSize) searchingForEnd := false for p.isParsing { + var aByte uint8 if p.isParsing { - aByte := <-p.inputChan + aByte = <-p.inputChan } else { return } @@ -111,7 +112,7 @@ func (p *h264Parser) parse() { outputBuffer = append(outputBuffer, aByte) for i := 1; aByte == 0x00 && i != 4; i++ { if p.isParsing { - aByte := <-p.inputChan + aByte = <-p.inputChan } else { return } @@ -125,7 +126,7 @@ func (p *h264Parser) parse() { searchingForEnd = false } if p.isParsing { - aByte := <-p.inputChan + aByte = <-p.inputChan } else { return }