mirror of
https://github.com/pion/mediadevices.git
synced 2025-09-26 20:41:46 +08:00
add null pointer from C
This commit is contained in:
@@ -98,8 +98,11 @@ func (d *Decoder) Decode(data []byte) {
|
||||
}
|
||||
|
||||
func (d *Decoder) GetFrame() *VpxImage {
|
||||
iter := C.newIter()
|
||||
img := C.getFrame(d.codec, iter)
|
||||
var iter C.vpx_codec_iter_t = nil // initialize to NULL to start iteration
|
||||
img := C.getFrame(d.codec, &iter)
|
||||
if img == nil {
|
||||
return nil
|
||||
}
|
||||
return &VpxImage{img: img}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user