mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-03 16:59:12 +02:00
gst free error only if occurs.
This commit is contained in:
parent
0f27b81f76
commit
c808759709
1 changed files with 1 additions and 1 deletions
|
@ -172,9 +172,9 @@ func CreatePipeline(pipelineStr string, clockRate float32) (*Pipeline, error) {
|
|||
var gstError *C.GError
|
||||
|
||||
gstPipeline = C.gst_parse_launch(pipelineStrUnsafe, &gstError)
|
||||
defer C.g_error_free(gstError)
|
||||
|
||||
if gstError != nil {
|
||||
defer C.g_error_free(gstError)
|
||||
return nil, fmt.Errorf("(pipeline error) %s", C.GoString(gstError.message))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue