Skip to content

Commit

Permalink
Fix go 1.6 "cgo argument has Go pointer to Go pointer" error
Browse files Browse the repository at this point in the history
  • Loading branch information
Haochi Chen committed Mar 13, 2016
1 parent 5c06ae0 commit a47d7e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion codecCtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ static int select_channel_layout(AVCodec *codec) {
return best_ch_layout;
}
static void call_av_freep(AVCodecContext *out){
return av_freep(&out);
}
*/
import "C"

Expand Down Expand Up @@ -204,7 +207,7 @@ func (this *CodecCtx) Free() {

func (this *CodecCtx) CloseAndRelease() {
this.Close()
C.av_freep(unsafe.Pointer(&this.avCodecCtx))
C.call_av_freep(this.avCodecCtx)
}

// @todo
Expand Down

0 comments on commit a47d7e4

Please sign in to comment.