From 75a6df5da5a15426c7a9c3d9e0ae3b477e920560 Mon Sep 17 00:00:00 2001 From: Saxon Date: Mon, 29 Jul 2019 12:33:14 +0930 Subject: [PATCH] codec/h264/h264dec: removed readBitsInt and readBool --- codec/h264/h264dec/parse.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/codec/h264/h264dec/parse.go b/codec/h264/h264dec/parse.go index e6fba287..68abe8c6 100644 --- a/codec/h264/h264dec/parse.go +++ b/codec/h264/h264dec/parse.go @@ -49,20 +49,9 @@ func newFieldReader(br *bits.BitReader) fieldReader { return fieldReader{br: br} } -// readBool returns a bool from reading one bit from br. If we have an error -// already, we do not continue with the read. -func (r fieldReader) readBool() bool { - if r.e != nil { - return false - } - var b uint64 - b, r.e = r.br.ReadBits(1) - return b == 1 -} - // readBitsInt returns an int from reading n bits from br. If we have an error // already, we do not continue with the read. -func (r fieldReader) readBitsInt(n int) int { +func (r fieldReader) readBits(n int) int { if r.e != nil { return 0 }