discoverer: don't change result for missing plugin errors

https://bugzilla.gnome.org/show_bug.cgi?id=671047
This commit is contained in:
Jonathan Matthew 2012-02-29 21:25:24 +10:00 committed by Tim-Philipp Müller
parent 55ed216911
commit bc1fb43408

View file

@ -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;