av: fixed broken tests

This commit is contained in:
Saxon 2019-04-15 11:43:46 +09:30
parent 3534d9031a
commit 56a9b7d6ef
2 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,7 @@ import (
type buffer bytes.Buffer
func (b *buffer) Write(d []byte) (int, error) {
return b.Write(d)
return (*bytes.Buffer)(b).Write(d)
}
func (b *buffer) Close() error { return nil }

View File

@ -222,6 +222,8 @@ func (rs *rtmpSender) Write(p []byte) (int, error) {
return n, nil
}
func (rs *rtmpSender) Close() error { return nil }
// TestFromFile tests streaming from an video file comprising raw H.264.
// The test file is supplied via the RTMP_TEST_FILE environment variable.
func TestFromFile(t *testing.T) {