use decodbin as an example of the gerr interface

This commit is contained in:
tinyzimmer
2020-10-04 10:14:52 +03:00
parent 4cef99cfff
commit c96b23ba23

View File

@@ -137,7 +137,11 @@ func runPipeline(loop *gst.MainLoop, pipeline *gst.Pipeline) error {
case gst.MessageEOS: case gst.MessageEOS:
err = errors.New("end-of-stream") err = errors.New("end-of-stream")
case gst.MessageError: case gst.MessageError:
err = msg.ParseError() // The parsed error implements the error interface, but also
// contains additional debug information.
gerr := msg.ParseError()
fmt.Println("go-gst-debug:", gerr.DebugString())
err = gerr
} }
// If either condition triggered an error, log and quit // If either condition triggered an error, log and quit