From c995758d6a4c7ba7f568964c1a850b55743f44f3 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Tue, 1 Jun 2004 08:51:55 +0000 Subject: more readable g_error Original commit message from CVS: more readable g_error --- ChangeLog | 5 +++++ gst-libs/gst/media-info/media-info-priv.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6ba4b857..b51b3fcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-06-01 Thomas Vander Stichele + + * gst-libs/gst/media-info/media-info-priv.c: (gmi_set_mime): + change assert to a more readable error message + 2004-05-31 Stephane Loeuillet * gst-libs/gst/tuner/tunerchannel.h: diff --git a/gst-libs/gst/media-info/media-info-priv.c b/gst-libs/gst/media-info/media-info-priv.c index 22ac6c45..fc0e9be8 100644 --- a/gst-libs/gst/media-info/media-info-priv.c +++ b/gst-libs/gst/media-info/media-info-priv.c @@ -395,6 +395,9 @@ gmi_set_mime (GstMediaInfo * info, const char *mime) } /* get a bunch of elements from the bin */ priv->source = gst_bin_get_by_name (GST_BIN (priv->pipeline), "source"); + if (!GST_IS_ELEMENT (priv->source)) + g_error ("Could not create source element '%s'", priv->source_name); + g_assert (GST_IS_ELEMENT (priv->source)); g_object_set (G_OBJECT (priv->source), "location", priv->location, NULL); priv->decoder = gst_bin_get_by_name (GST_BIN (priv->pipeline), "decoder"); -- cgit v1.2.1