Skip to content

Commit

Permalink
get wrong width and height on 64bit system
Browse files Browse the repository at this point in the history
  • Loading branch information
godcong committed May 27, 2019
1 parent 9646865 commit cd51973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avcodec/avcodec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit cd51973

Please sign in to comment.