nareix / joy4

Golang audio/video library and streaming server
MIT License
2.66k stars 501 forks source link

example error #63

Open likezjuisee opened 6 years ago

likezjuisee commented 6 years ago

root@ubuntu-HP-ProDesk-680-G2-MT:/usr/local/lib# ffmpeg ffmpeg version 3.1.11 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609 configuration: --prefix=/usr/local --enable-shared libavutil 55. 28.100 / 55. 78.100 libavcodec 57. 48.101 / 57.107.100 libavformat 57. 41.100 / 57. 83.100 libavdevice 57. 0.101 / 57. 10.100 libavfilter 6. 47.100 / 6.107.100 libswscale 4. 1.100 / 4. 8.100 libswresample 2. 1.100 / 2. 9.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

root@ubuntu-HP-ProDesk-680-G2-MT:~/go/src/github.com/nareix/joy4/examples/audio_decode# go run main.go /# github.com/nareix/joy4/cgo/ffmpeg ../../cgo/ffmpeg/audio.go: In function ‘wrap_avcodec_decode_audio4’: ../../cgo/ffmpeg/audio.go:7:2: warning: ‘avcodec_decode_audio4’ is deprecated [-Wdeprecated-declarations] return avcodec_decode_audio4(ctx, frame, got, &pkt); ^ In file included from /usr/local/include/libavformat/avformat.h:317:0, from ../../cgo/ffmpeg/ffmpeg.h:2, from ../../cgo/ffmpeg/audio.go:4: /usr/local/include/libavcodec/avcodec.h:4714:5: note: declared here int avcodec_decode_audio4(AVCodecContext avctx, AVFrame frame, ^ ../../cgo/ffmpeg/audio.go: In function ‘_cgo_77bb8e1dcb21_Cfunc_avcodec_encode_audio2’: ../../cgo/ffmpeg/audio.go:124:2: warning: ‘avcodec_encode_audio2’ is deprecated [-Wdeprecated-declarations] } ^ In file included from /usr/local/include/libavformat/avformat.h:317:0, from ../../cgo/ffmpeg/ffmpeg.h:2, from ../../cgo/ffmpeg/audio.go:4: /usr/local/include/libavcodec/avcodec.h:5232:5: note: declared here int avcodec_encode_audio2(AVCodecContext avctx, AVPacket avpkt, ^ /# github.com/nareix/joy4/cgo/ffmpeg ../../cgo/ffmpeg/video.go: In function ‘wrap_avcodec_decode_video2’: ../../cgo/ffmpeg/video.go:7:2: warning: ‘avcodec_decode_video2’ is deprecated [-Wdeprecated-declarations] return avcodec_decode_video2(ctx, frame, got, &pkt); ^ In file included from /usr/local/include/libavformat/avformat.h:317:0, from ../../cgo/ffmpeg/ffmpeg.h:2, from ../../cgo/ffmpeg/video.go:4: /usr/local/include/libavcodec/avcodec.h:4763:5: note: declared here int avcodec_decode_video2(AVCodecContext avctx, AVFrame picture, ^ panic: runtime error: index out of range

goroutine 1 [running]: panic(0x6666a0, 0xc82000a0c0) /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6 main.main() /home/ubuntu/go/src/github.com/nareix/joy4/examples/audio_decode/main.go:30 +0x3ae exit status 2