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

Invalid memory address or nil pointer dereference in Transcoding example code #133

Open
MoCuishle28 opened this issue Jan 12, 2023 · 0 comments

Comments

@MoCuishle28
Copy link

MoCuishle28 commented Jan 12, 2023

joy4 version: v0.0.0-20200507095837-05a4ffbb5369
ffmpeg version: N-109585-g379e43e6ec
OS: Ubuntu 20.04

When I run Transcoding example code joy4/examples/transcode/main.go, I meet this panic:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x53c700]

goroutine 1 [running]:
github.com/nareix/joy4/cgo/ffmpeg.(*AudioEncoder).SetSampleRate(0x585d3d?, 0xa?)
        /root/.gvm/pkgsets/go1.19/global/pkg/mod/github.com/nareix/[email protected]/cgo/ffmpeg/audio.go:227
main.main.func1({0x5bb148, 0xc00002c0c0}, 0x2?)
        /root/codes/video/joy4-demo/transcode/main.go:24 +0x68
github.com/nareix/joy4/av/transcode.NewTranscoder({0xc00006c060, 0x2, 0x19?}, {0xc?})
        /root/.gvm/pkgsets/go1.19/global/pkg/mod/github.com/nareix/[email protected]/av/transcode/transcode.go:44 +0x199
github.com/nareix/joy4/av/transcode.(*Demuxer).prepare(0xc00002c080)
        /root/.gvm/pkgsets/go1.19/global/pkg/mod/github.com/nareix/[email protected]/av/transcode/transcode.go:207 +0x4d
github.com/nareix/joy4/av/transcode.(*Demuxer).Streams(0xc00002c080)
        /root/.gvm/pkgsets/go1.19/global/pkg/mod/github.com/nareix/[email protected]/av/transcode/transcode.go:236 +0x25
github.com/nareix/joy4/av/avutil.CopyFile({0x7febbe0fe880?, 0xc00007e630}, {0x5ba998, 0xc00002c080})
        /root/.gvm/pkgsets/go1.19/global/pkg/mod/github.com/nareix/[email protected]/av/avutil/avutil.go:296 +0x3a
main.main()
        /root/codes/video/joy4-demo/transcode/main.go:39 +0x112
exit status 2
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

1 participant