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 }