mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
registry: Substitute deprecated GLib symbol: g_mapped_file_free
Use g_mapped_file_unref if Glib >= 2.22 is available Fixes bug #560442.
This commit is contained in:
parent
f490508490
commit
ca974b1a8f
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue