winegstreamer: Avoid using WARN_ON from a GStreamer callback.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-07-10 19:22:18 -05:00 committed by Alexandre Julliard
parent 2ffcf44021
commit bcc19e88fb
1 changed files with 1 additions and 1 deletions

View File

@ -977,7 +977,7 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
gst_query_parse_accept_caps(query, &caps); gst_query_parse_accept_caps(query, &caps);
wg_format_from_caps(&format, caps); wg_format_from_caps(&format, caps);
ret = wg_format_compare(&format, &stream->current_format); ret = wg_format_compare(&format, &stream->current_format);
if (!ret && WARN_ON(gstreamer)) if (!ret && gst_debug_category_get_threshold(GST_CAT_DEFAULT) >= GST_LEVEL_WARNING)
{ {
gchar *str = gst_caps_to_string(caps); gchar *str = gst_caps_to_string(caps);
GST_WARNING("Rejecting caps \"%s\".", str); GST_WARNING("Rejecting caps \"%s\".", str);