mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gstplay: add warning message details check before post it
For some warning message which has no detail data, need check to avoid printing critical log. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3382>
This commit is contained in:
parent
e93f391139
commit
b09b246fc8
1 changed files with 9 additions and 3 deletions
|
@ -1061,9 +1061,15 @@ warning_cb (G_GNUC_UNUSED GstBus * bus, GstMessage * msg, gpointer user_data)
|
|||
GST_WARNING_OBJECT (self, "Warning: %s (%s, %d)", err->message,
|
||||
g_quark_to_string (err->domain), err->code);
|
||||
|
||||
api_bus_post_message (self, GST_PLAY_MESSAGE_WARNING,
|
||||
GST_PLAY_MESSAGE_DATA_WARNING, G_TYPE_ERROR, play_err,
|
||||
GST_PLAY_MESSAGE_DATA_WARNING_DETAILS, GST_TYPE_STRUCTURE, details, NULL);
|
||||
if (details != NULL) {
|
||||
api_bus_post_message (self, GST_PLAY_MESSAGE_WARNING,
|
||||
GST_PLAY_MESSAGE_DATA_WARNING, G_TYPE_ERROR, play_err,
|
||||
GST_PLAY_MESSAGE_DATA_WARNING_DETAILS, GST_TYPE_STRUCTURE, details,
|
||||
NULL);
|
||||
} else {
|
||||
api_bus_post_message (self, GST_PLAY_MESSAGE_WARNING,
|
||||
GST_PLAY_MESSAGE_DATA_WARNING, G_TYPE_ERROR, play_err, NULL);
|
||||
}
|
||||
|
||||
g_clear_error (&play_err);
|
||||
g_clear_error (&err);
|
||||
|
|
Loading…
Reference in a new issue