From f1235bdbd89e3943cca1762767174e683985fb96 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 24 Jul 2007 13:44:04 +0000 Subject: [PATCH] gst/gstregistrybinary.c: Print error just once and with additional info. Original commit message from CVS: * gst/gstregistrybinary.c: (gst_registry_binary_check_magic), (gst_registry_binary_load_feature), (gst_registry_binary_load_plugin), (gst_registry_binary_read_cache): Print error just once and with additional info. --- ChangeLog | 8 ++++++++ gst/gstregistrybinary.c | 10 ++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c32a4b3159..4d177cf5be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-07-24 Stefan Kost + + * gst/gstregistrybinary.c: (gst_registry_binary_check_magic), + (gst_registry_binary_load_feature), + (gst_registry_binary_load_plugin), + (gst_registry_binary_read_cache): + Print error just once and with additional info. + 2007-07-24 Stefan Kost * libs/gst/base/gsttypefindhelper.c: (helper_find_peek), diff --git a/gst/gstregistrybinary.c b/gst/gstregistrybinary.c index 3cc9be772a..c36280f034 100644 --- a/gst/gstregistrybinary.c +++ b/gst/gstregistrybinary.c @@ -575,12 +575,12 @@ gst_registry_binary_check_magic (gchar ** in) unpack_element (*in, m, GstBinaryRegistryMagic); if (m == NULL || m->magic == NULL || m->version == NULL) { - GST_ERROR ("Binary registry magic structure is broken"); + GST_WARNING ("Binary registry magic structure is broken"); return FALSE; } if (strncmp (m->magic, GST_MAGIC_BINARY_REGISTRY_STR, GST_MAGIC_BINARY_REGISTRY_LEN) != 0) { - GST_ERROR + GST_WARNING ("Binary registry magic is different : %02x%02x%02x%02x != %02x%02x%02x%02x", GST_MAGIC_BINARY_REGISTRY_STR[0] & 0xff, GST_MAGIC_BINARY_REGISTRY_STR[1] & 0xff, @@ -590,7 +590,7 @@ gst_registry_binary_check_magic (gchar ** in) return FALSE; } if (strncmp (m->version, GST_MAJORMINOR, GST_MAGIC_BINARY_VERSION_LEN)) { - GST_ERROR ("Binary registry magic version is different : %s != %s", + GST_WARNING ("Binary registry magic version is different : %s != %s", GST_MAJORMINOR, m->version); return FALSE; } @@ -903,7 +903,9 @@ gst_registry_binary_read_cache (GstRegistry * registry, const char *location) } /* check if header is valid */ if (!gst_registry_binary_check_magic (&in)) { - GST_ERROR ("Binary registry type not recognized (invalid magic)"); + GST_ERROR + ("Binary registry type not recognized (invalid magic) for file at %s", + location); goto Error; }