Using out instead of outputFile

This commit is contained in:
saxon 2018-07-04 22:15:24 +09:30
parent b59e756d53
commit 76909221a9
1 changed files with 6 additions and 6 deletions

View File

@ -68,13 +68,13 @@ func TestH264Parser(t *testing.T) {
select {
case parser.InputChan() <- data[i]:
case frame := <-parser.OutputChan():
outputFile, err := os.Create("testOutput/" + strconv.Itoa(n) + ".h264_frame")
out, err := os.Create("testOutput/" + strconv.Itoa(n) + ".h264_frame")
if err != nil {
t.Errorf("Should not have got error creating output file!")
return
}
outputFile.Write(frame)
outputFile.Close()
out.Write(frame)
out.Close()
n++
default:
}
@ -113,13 +113,13 @@ func TestMJPEGParser(t *testing.T) {
log.Println("Writing jpegs to files!")
for i := 0; len(parser.GetOutputChan()) > 0; i++ {
// Open a new output file
outputFile, err := os.Create("testOutput/image" + strconv.Itoa(i) + ".jpeg")
out, err := os.Create("testOutput/image" + strconv.Itoa(i) + ".jpeg")
if err != nil {
t.Errorf("Should not have got error creating output file!")
return
}
outputFile.Write(<-parser.GetOutputChan())
outputFile.Close()
out.Write(<-parser.GetOutputChan())
out.Close()
}
}
*/