From cd5197327fc49a51ea63a4405fe98a7b4c91c72a Mon Sep 17 00:00:00 2001 From: godcong Date: Mon, 27 May 2019 22:09:44 +0800 Subject: [PATCH] get wrong width and height on 64bit system --- avcodec/avcodec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avcodec/avcodec.go b/avcodec/avcodec.go index 19695d8..c09ba8a 100644 --- a/avcodec/avcodec.go +++ b/avcodec/avcodec.go @@ -66,11 +66,11 @@ func (cp *AvCodecParameters) AvCodecGetType() MediaType { } func (cp *AvCodecParameters) AvCodecGetWidth() int { - return *((*int)(unsafe.Pointer(&cp.width))) + return (int)(*((*int32)(unsafe.Pointer(&cp.width)))) } func (cp *AvCodecParameters) AvCodecGetHeight() int { - return *((*int)(unsafe.Pointer(&cp.height))) + return (int)(*((*int32)(unsafe.Pointer(&cp.height)))) } func (cp *AvCodecParameters) AvCodecGetChannels() int {