some staticcheck fixes

This commit is contained in:
RSWilli
2023-09-02 00:04:14 +02:00
parent c1392706ff
commit 095e65c800
20 changed files with 70 additions and 67 deletions

View File

@@ -26,12 +26,16 @@ func createPipeline() (*gst.Pipeline, error) {
"audiotestsrc name=src ! queue max-size-time=2000000000 ! fakesink name=sink sync=true",
)
if err != nil {
return nil, err
}
// Retrieve the sink element
sinks, err := pipeline.GetSinkElements()
if err != nil {
return nil, err
} else if len(sinks) != 1 {
return nil, errors.New("Expected one sink back")
return nil, errors.New("expected one sink back")
}
sink := sinks[0]