From c24d3f677b4313c2d891faa16ef6dfcde3eafb41 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Mon, 16 Nov 2020 00:10:25 +0100 Subject: [PATCH] update examples --- examples/client-read-tcp.go | 5 ++--- examples/client-read-udp.go | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/examples/client-read-tcp.go b/examples/client-read-tcp.go index 192dfd0f..9e97b17f 100644 --- a/examples/client-read-tcp.go +++ b/examples/client-read-tcp.go @@ -25,7 +25,7 @@ func main() { readerDone := make(chan struct{}) defer func() { <-readerDone }() - // read frames + // read frames from the server conn.OnFrame(func(id int, typ gortsplib.StreamType, buf []byte, err error) { if err != nil { fmt.Printf("ERR: %v\n", err) @@ -33,7 +33,6 @@ func main() { return } - fmt.Printf("frame from track %d, type %v: %v\n", - id, typ, buf) + fmt.Printf("frame from track %d, type %v: %v\n", id, typ, buf) }) } diff --git a/examples/client-read-udp.go b/examples/client-read-udp.go index 944e523c..789516dd 100644 --- a/examples/client-read-udp.go +++ b/examples/client-read-udp.go @@ -22,7 +22,7 @@ func main() { readerDone := make(chan struct{}) defer func() { <-readerDone }() - // read frames + // read frames from the server conn.OnFrame(func(id int, typ gortsplib.StreamType, buf []byte, err error) { if err != nil { fmt.Printf("ERR: %v\n", err) @@ -30,7 +30,6 @@ func main() { return } - fmt.Printf("frame from track %d, type %v: %v\n", - id, typ, buf) + fmt.Printf("frame from track %d, type %v: %v\n", id, typ, buf) }) }