mirror of https://bitbucket.org/ausocean/av.git
Improved error message
This commit is contained in:
parent
76909221a9
commit
e6c2cf5f00
|
@ -28,6 +28,7 @@ LICENSE
|
|||
package parser
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
|
@ -68,9 +69,10 @@ func TestH264Parser(t *testing.T) {
|
|||
select {
|
||||
case parser.InputChan() <- data[i]:
|
||||
case frame := <-parser.OutputChan():
|
||||
out, err := os.Create("testOutput/" + strconv.Itoa(n) + ".h264_frame")
|
||||
path := fmt.Sprintf("testOutput/" + strconv.Itoa(n) + "h264_frame")
|
||||
out, err := os.Create(path)
|
||||
if err != nil {
|
||||
t.Errorf("Should not have got error creating output file!")
|
||||
t.Errorf("Unexpected error creating %q: %v", path, err)
|
||||
return
|
||||
}
|
||||
out.Write(frame)
|
||||
|
|
Loading…
Reference in New Issue