tagschecking: Use gst_message_parse_warning in case of GST_MESSAGE_WARNING

Bus message handler of tags checking unit test uses gst_message_parse_error()
in case of GST_MESSAGE_ERROR and GST_MESAGE_WARNING.
If gst_message_parse_error() is called in case of GST_MESSAGE_WARNING, assert occurs.
So modified to use gst_message_parse_warning() in case of GST_MESSAGE_WARNING.
This commit is contained in:
KimTaeSoo 2018-12-19 22:51:11 +09:00 committed by Sebastian Dröge
parent 5ae917f62f
commit b01210c554

View file

@ -35,10 +35,13 @@ bus_handler (GstBus * bus, GstMessage * message, gpointer data)
case GST_MESSAGE_WARNING:
case GST_MESSAGE_ERROR:{
GError *gerror;
gchar *debug;
gst_message_parse_error (message, &gerror, &debug);
if (message->type == GST_MESSAGE_WARNING) {
gst_message_parse_warning (message, &gerror, &debug);
} else {
gst_message_parse_error (message, &gerror, &debug);
}
gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
g_error_free (gerror);
g_free (debug);