mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +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/6385>
This commit is contained in:
parent
8acf844fed
commit
76d1bd05b2
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);
|
||||
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
extra_details = gst_structure_copy (details);
|
||||
if (details != NULL) {
|
||||
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)) {
|
||||
dot_data = gst_debug_bin_to_dot_data (GST_BIN_CAST (self->playbin),
|
||||
GST_DEBUG_GRAPH_SHOW_ALL);
|
||||
|
|
Loading…
Reference in a new issue