tools/gst-compprep.c: Make an error that baffled me a bit clearer
authorJan Schmidt <thaytan@mad.scientist.com>
Sat, 12 Jun 2004 10:14:40 +0000 (10:14 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Sat, 12 Jun 2004 10:14:40 +0000 (10:14 +0000)
Original commit message from CVS:
* tools/gst-compprep.c: (handle_xmlerror), (main):
Make an error that baffled me a bit clearer

ChangeLog
common
tools/gst-compprep.c

index 199f302..dde789e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-06-12  Jan Schmidt  <thaytan@mad.scientist.com>
+       * tools/gst-compprep.c: (handle_xmlerror), (main):
+         Make an error that baffled me a bit clearer
+
 2004-06-12  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * gst/gstqueue.c:
diff --git a/common b/common
index 46a6baf..2188863 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 46a6bafafc3f83c5dbccf20eae52db71c67dfe06
+Subproject commit 21888634686506a6938e435f9c4fd5a9f20ccc3e
index 8983f4f..12cbbb7 100644 (file)
@@ -8,6 +8,14 @@
 
 GST_DEBUG_CATEGORY_STATIC (debug_compprep);
 #define GST_CAT_DEFAULT debug_compprep
+#define GST_COMPREG_FILE (GST_CACHE_DIR "/compreg.xml")
+
+void
+handle_xmlerror (void *userData, xmlErrorPtr error)
+{
+  g_print ("Error writing the completion registry: %s, %s\n", GST_COMPREG_FILE,
+      error->message);
+}
 
 int
 main (int argc, char *argv[])
@@ -120,9 +128,10 @@ main (int argc, char *argv[])
   }
 
 #ifdef HAVE_LIBXML2
-  xmlSaveFormatFile (GST_CACHE_DIR "/compreg.xml", doc, 1);
+  xmlSetStructuredErrorFunc (NULL, handle_xmlerror);
+  xmlSaveFormatFile (GST_COMPREG_FILE, doc, 1);
 #else
-  xmlSaveFile (GST_CACHE_DIR "/compreg.xml", doc);
+  xmlSaveFile (GST_COMPREG_FILE, doc);
 #endif
 
   return 0;