projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f490508
)
registry: Substitute deprecated GLib symbol: g_mapped_file_free
author
Javier Jardón
<jjardon@gnome.org>
Thu, 3 Dec 2009 18:48:11 +0000
(19:48 +0100)
committer
Sebastian Dröge
<sebastian.droege@collabora.co.uk>
Fri, 4 Dec 2009 13:50:46 +0000
(14:50 +0100)
Use g_mapped_file_unref if Glib >= 2.22 is available
Fixes bug #560442.
gst/gstregistrybinary.c
patch
|
blob
|
history
diff --git
a/gst/gstregistrybinary.c
b/gst/gstregistrybinary.c
index
576ab02
..
42b010e
100644
(file)
--- a/
gst/gstregistrybinary.c
+++ b/
gst/gstregistrybinary.c
@@
-524,7
+524,11
@@
gst_registry_binary_read_cache (GstRegistry * registry, const char *location)
if (contents == NULL) {
/* Error mmap-ing the cache, try a plain memory read */
if (mapped) {
+#if GLIB_CHECK_VERSION(2,22,0)
+ g_mapped_file_unref (mapped);
+#else
g_mapped_file_free (mapped);
+#endif
mapped = NULL;
}
@@
-602,7
+606,11
@@
Error:
g_timer_destroy (timer);
#endif
if (mapped) {
+#if GLIB_CHECK_VERSION(2,22,0)
+ g_mapped_file_unref (mapped);
+#else
g_mapped_file_free (mapped);
+#endif
} else {
g_free (contents);
}