Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

读取mp4报错out of range #144

Open
avriltank opened this issue Aug 19, 2024 · 2 comments
Open

读取mp4报错out of range #144

avriltank opened this issue Aug 19, 2024 · 2 comments

Comments

@avriltank
Copy link

func (bs *BitStream) GetBit() uint8 {
    if bs.bytesOffset >= len(bs.bits) {
        panic("OUT OF RANGE")
    }
    ret := bs.bits[bs.bytesOffset] >> (7 - bs.bitsOffset) & 0x01
    bs.bitsOffset++
    if bs.bitsOffset >= 8 {
        bs.bytesOffset++
        bs.bitsOffset = 0
    }
    return ret
}

这里报错,问题mp4文件,可以在https://f.ws28.cn/f/evq0mg0smui 下载

@yapingcat
Copy link
Owner

更新到最新版本 在试下

@avriltank
Copy link
Author

最新版本可以了,作者,这是更新了哪块内容?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants