mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 23:18:52 +00:00
play: Fix a critical warning in error callback
`on_error()` can be called with a NULL details structure, so in that situation the `gst_structure_copy()` would raise a critical warning. Create an empty structure instead of attempting to copy a NULL one. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6387>
This commit is contained in:
parent
93255efece
commit
559278420b
1 changed files with 5 additions and 1 deletions
|
@ -981,7 +981,11 @@ on_error (GstPlay * self, GError * err, const GstStructure * details)
|
||||||
g_quark_to_string (err->domain), err->code);
|
g_quark_to_string (err->domain), err->code);
|
||||||
|
|
||||||
#ifndef GST_DISABLE_GST_DEBUG
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
|
if (details != NULL) {
|
||||||
extra_details = gst_structure_copy (details);
|
extra_details = gst_structure_copy (details);
|
||||||
|
} else {
|
||||||
|
extra_details = gst_structure_new_empty ("error-details");
|
||||||
|
}
|
||||||
if (gst_play_config_get_pipeline_dump_in_error_details (self->config)) {
|
if (gst_play_config_get_pipeline_dump_in_error_details (self->config)) {
|
||||||
dot_data = gst_debug_bin_to_dot_data (GST_BIN_CAST (self->playbin),
|
dot_data = gst_debug_bin_to_dot_data (GST_BIN_CAST (self->playbin),
|
||||||
GST_DEBUG_GRAPH_SHOW_ALL);
|
GST_DEBUG_GRAPH_SHOW_ALL);
|
||||||
|
|
Loading…
Reference in a new issue