add a couple returns

This commit is contained in:
tinyzimmer
2020-10-04 18:25:24 +03:00
parent ddde8050f5
commit 440a4649f9

View File

@@ -65,6 +65,7 @@ func encodeGif(mainLoop *gst.MainLoop) error {
err := gst.NewGError(2, err)
pipeline.GetPipelineBus().
Post(gst.NewErrorMessage(self, err, "", nil))
return
}
// Add the elements to the pipeline and sync their state with the pipeline
@@ -99,6 +100,7 @@ func encodeGif(mainLoop *gst.MainLoop) error {
err := gst.NewGError(3, errors.New("Failed to query video duration from decodebin"))
pipeline.GetPipelineBus().
Post(gst.NewErrorMessage(self, err, "", nil))
return
}
// Fetch the result from the query.