3d0c / gmf

Go Media Framework
MIT License
891 stars 170 forks source link

run encoding_mp4.go overflows uint64 #65

Closed lidedongsn closed 7 years ago

lidedongsn commented 7 years ago

go run encoding_mp4.go

# github.com/3d0c/gmf
cgo-gcc-prolog: In function ‘_cgo_2ed26a316b1d_Cfunc_avcodec_encode_audio2’:
cgo-gcc-prolog:197:2: warning: ‘avcodec_encode_audio2’ is deprecated (declared at /root/local/ffmpeg/include/libavcodec/avcodec.h:5440) [-Wdeprecated-declarations]
cgo-gcc-prolog: In function ‘_cgo_2ed26a316b1d_Cfunc_avcodec_encode_video2’:
cgo-gcc-prolog:218:2: warning: ‘avcodec_encode_video2’ is deprecated (declared at /root/local/ffmpeg/include/libavcodec/avcodec.h:5479) [-Wdeprecated-declarations]
# github.com/3d0c/gmf
cgo-gcc-prolog: In function ‘_cgo_2ed26a316b1d_Cfunc_avcodec_decode_audio4’:
cgo-gcc-prolog:87:2: warning: ‘avcodec_decode_audio4’ is deprecated (declared at /root/local/ffmpeg/include/libavcodec/avcodec.h:4915) [-Wdeprecated-declarations]
cgo-gcc-prolog: In function ‘_cgo_2ed26a316b1d_Cfunc_avcodec_decode_video2’:
cgo-gcc-prolog:108:2: warning: ‘avcodec_decode_video2’ is deprecated (declared at /root/local/ffmpeg/include/libavcodec/avcodec.h:4964) [-Wdeprecated-declarations]
# github.com/3d0c/gmf
cgo-gcc-prolog: In function ‘_cgo_2ed26a316b1d_Cfunc_avcodec_copy_context’:
cgo-gcc-prolog:42:2: warning: ‘avcodec_copy_context’ is deprecated (declared at /root/local/ffmpeg/include/libavcodec/avcodec.h:4389) [-Wdeprecated-declarations]
# github.com/3d0c/gmf
/root/go/src/github.com/3d0c/gmf/codec.go:95: constant -9223372036854775808 overflows uint64
mkrufky commented 7 years ago

This is a bug in Golang 1.9.x ... Upgrade to Golang 1.9.2 or later for the fix.

3d0c commented 7 years ago

@mkrufky Thanks!

mkrufky commented 7 years ago

Correction: simply moving to Golang 1.9.2 isn't enough. This PR also needs to be merged: https://github.com/3d0c/gmf/pull/66