mirror of https://bitbucket.org/ausocean/av.git
codec/h264/h264dec: removed readBitsInt and readBool
This commit is contained in:
parent
9f47b22a84
commit
75a6df5da5
|
@ -49,20 +49,9 @@ func newFieldReader(br *bits.BitReader) fieldReader {
|
||||||
return fieldReader{br: br}
|
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
|
// readBitsInt returns an int from reading n bits from br. If we have an error
|
||||||
// already, we do not continue with the read.
|
// 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 {
|
if r.e != nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue