From db0e29250711a1008d5c6565d905404a0beacd00 Mon Sep 17 00:00:00 2001 From: Saxon Date: Mon, 23 Dec 2019 12:51:21 +1030 Subject: [PATCH] codec/mjpeg/extract.go: simplified error message when can't get RTP payload --- codec/mjpeg/extract.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codec/mjpeg/extract.go b/codec/mjpeg/extract.go index 58b91367..9174074f 100644 --- a/codec/mjpeg/extract.go +++ b/codec/mjpeg/extract.go @@ -63,7 +63,7 @@ func (e *Extractor) Extract(dst io.Writer, src io.Reader, delay time.Duration) e // Get payload from RTP packet. p, err := rtp.Payload(buf[:n]) if err != nil { - return fmt.Errorf("could not get RTP payload, failed with err: %v\n", err) + return fmt.Errorf("could not get RTP payload: %w\n", err) } // Also grab the marker so that we know when the JPEG is finished.