From 7c8ba0ae4b8665b41d0235b979121500b12ce237 Mon Sep 17 00:00:00 2001 From: Saxon Date: Mon, 23 Dec 2019 13:59:27 +1030 Subject: [PATCH] codec/mjpeg/utils.go: using BigEndian.Uint16 in get16 --- codec/mjpeg/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codec/mjpeg/utils.go b/codec/mjpeg/utils.go index 23c0fb3e..511a9da3 100644 --- a/codec/mjpeg/utils.go +++ b/codec/mjpeg/utils.go @@ -95,7 +95,7 @@ func (b *byteStream) get8() int { } func (b *byteStream) get16() int { - v := int(b.bytes[b.i])<<8 | int(b.bytes[b.i+1]) + v := int(binary.BigEndian.Uint16(b.bytes[b.i:])) b.i += 2 return v }