mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
docs: basic-tutotial-1: Don't crash on error
Using g_error() crashes the application, producing a coredump e.g. when the user closes the video window, which can be confusing (especially on the very first tutorial). Let's change this to log the error message without crashing, using g_printerr(), like subsequent tutorials. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6883>
This commit is contained in:
parent
b7357fd316
commit
85fa81c7c8
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ tutorial_main (int argc, char *argv[])
|
|||
|
||||
/* 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.");
|
||||
g_printerr ("An error occurred! Re-run with the GST_DEBUG=*:WARN "
|
||||
"environment variable set for more details.\n");
|
||||
}
|
||||
|
||||
/* Free resources */
|
||||
|
|
Loading…
Reference in a new issue