func LastError() error { str := C.libvlc_errmsg() if str == nil { return nil } defer C.free(unsafe.Pointer(str)) defer C.libvlc_clearerr() return errors.New(C.GoString(str)) }
// Clears the LibVLC error status for the current thread. This is optional. // By default, the error status is automatically overriden when a new error // occurs, and destroyed when the thread exits. func ClearError() { C.libvlc_clearerr() }