diff --git a/examples/gif-encoder/main.go b/examples/gif-encoder/main.go index 15c5955..252e5dd 100644 --- a/examples/gif-encoder/main.go +++ b/examples/gif-encoder/main.go @@ -126,7 +126,7 @@ func encodeGif(mainLoop *gst.MainLoop) error { if err := gif.EncodeAll(file, outGif); err != nil { fmt.Println("Could not encode images to gif format!", err) } - mainLoop.Quit() + pipeline.GetPipelineBus().Post(gst.NewEOSMessage(appSink)) }, NewSampleFunc: func(sink *app.Sink) gst.FlowReturn { // Increment the frame number counter