diff --git a/protocol/rtmp/rtmp_test.go b/protocol/rtmp/rtmp_test.go index e1e79796..f1b44554 100644 --- a/protocol/rtmp/rtmp_test.go +++ b/protocol/rtmp/rtmp_test.go @@ -173,6 +173,10 @@ func TestErorHandling(t *testing.T) { // TestFromFrame tests streaming from a single H.264 frame which is repeated. func TestFromFrame(t *testing.T) { testLog(0, "TestFromFrame") + testFrame := os.Getenv("RTMP_TEST_FRAME") + if testFrame == "" { + t.Skip("Skipping TestFromFrame since no RTMP_TEST_FRAME") + } if testKey == "" { t.Skip("Skipping TestFromFrame since no RTMP_TEST_KEY") } @@ -181,7 +185,6 @@ func TestFromFrame(t *testing.T) { t.Errorf("Dial failed with error: %v", err) } - testFrame := os.Getenv("RTMP_TEST_FRAME") b, err := ioutil.ReadFile(testFrame) if err != nil { t.Errorf("ReadFile failed with error: %v", err)