mirror of https://bitbucket.org/ausocean/av.git
Using out instead of outputFile
This commit is contained in:
parent
b59e756d53
commit
76909221a9
|
@ -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()
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue