mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
gst free error only if occurs.
This commit is contained in:
parent
0f27b81f76
commit
c808759709
@ -172,9 +172,9 @@ func CreatePipeline(pipelineStr string, clockRate float32) (*Pipeline, error) {
|
|||||||
var gstError *C.GError
|
var gstError *C.GError
|
||||||
|
|
||||||
gstPipeline = C.gst_parse_launch(pipelineStrUnsafe, &gstError)
|
gstPipeline = C.gst_parse_launch(pipelineStrUnsafe, &gstError)
|
||||||
defer C.g_error_free(gstError)
|
|
||||||
|
|
||||||
if gstError != nil {
|
if gstError != nil {
|
||||||
|
defer C.g_error_free(gstError)
|
||||||
return nil, fmt.Errorf("(pipeline error) %s", C.GoString(gstError.message))
|
return nil, fmt.Errorf("(pipeline error) %s", C.GoString(gstError.message))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user