diff --git a/subprojects/gst-docs/examples/tutorials/basic-tutorial-1.c b/subprojects/gst-docs/examples/tutorials/basic-tutorial-1.c index dfd449b238..573d4b2e90 100644 --- a/subprojects/gst-docs/examples/tutorials/basic-tutorial-1.c +++ b/subprojects/gst-docs/examples/tutorials/basic-tutorial-1.c @@ -25,9 +25,14 @@ main (int argc, char *argv[]) gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS); + /* See next tutorial for proper error message handling/parsing */ + if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) { + g_error ("An error occurred! Re-run with the GST_DEBUG=*:WARN environment " + "variable set for more details."); + } + /* Free resources */ - if (msg != NULL) - gst_message_unref (msg); + gst_message_unref (msg); gst_object_unref (bus); gst_element_set_state (pipeline, GST_STATE_NULL); gst_object_unref (pipeline);