av/rtmp/rtmp_test.go: using local rtmpSender io.writer implemntation to handle errors from rtmp

This commit is contained in:
saxon 2019-01-22 13:54:56 +10:30
parent 2697dcf515
commit 2da8d2af85
1 changed files with 2 additions and 1 deletions

View File

@ -243,8 +243,9 @@ func TestFromFile(t *testing.T) {
}
defer f.Close()
rs := &rtmpSender{conn: c}
// Pass RTMP session, true for audio, true for video, and 25 FPS
flvEncoder, err := flv.NewEncoder(c, true, true, 25)
flvEncoder, err := flv.NewEncoder(rs, true, true, 25)
if err != nil {
t.Fatalf("failed to create encoder: %v", err)
}