From bc1fb43408520e62661598d63ece648801e06f41 Mon Sep 17 00:00:00 2001 From: Jonathan Matthew Date: Wed, 29 Feb 2012 21:25:24 +1000 Subject: [PATCH] discoverer: don't change result for missing plugin errors https://bugzilla.gnome.org/show_bug.cgi?id=671047 --- gst-libs/gst/pbutils/gstdiscoverer.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c index ba02cdb..3486656 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.c +++ b/gst-libs/gst/pbutils/gstdiscoverer.c @@ -1158,8 +1158,15 @@ handle_message (GstDiscoverer * dc, GstMessage * msg) /* We need to stop */ done = TRUE; - GST_DEBUG ("Setting result to ERROR"); - dc->priv->current_info->result = GST_DISCOVERER_ERROR; + /* Don't override missing plugin result code for missing plugin errors */ + if (dc->priv->current_info->result != GST_DISCOVERER_MISSING_PLUGINS || + (!g_error_matches (gerr, GST_CORE_ERROR, + GST_CORE_ERROR_MISSING_PLUGIN) && + !g_error_matches (gerr, GST_STREAM_ERROR, + GST_STREAM_ERROR_CODEC_NOT_FOUND))) { + GST_DEBUG ("Setting result to ERROR"); + dc->priv->current_info->result = GST_DISCOVERER_ERROR; + } } break; -- 2.7.4