mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gst/gstregistrybinary.c: Always destroy the timer, also in error cases.
Original commit message from CVS: * gst/gstregistrybinary.c: (gst_registry_binary_read_cache): Always destroy the timer, also in error cases.
This commit is contained in:
parent
d845f192ae
commit
9564757cfb
3 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-09-07 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
* gst/gstregistrybinary.c: (gst_registry_binary_read_cache):
|
||||||
|
Always destroy the timer, also in error cases.
|
||||||
|
|
||||||
2007-09-05 Wim Taymans <wim.taymans@gmail.com>
|
2007-09-05 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
* docs/manual/highlevel-xml.xml:
|
* docs/manual/highlevel-xml.xml:
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit cd25ca736bc2446800de2180ad71fc1da858d324
|
Subproject commit 76752780462a3c4da712d56d54c45402144b3d0f
|
|
@ -887,6 +887,7 @@ gst_registry_binary_read_cache (GstRegistry * registry, const char *location)
|
||||||
g_file_get_contents (location, &contents, &size, &err);
|
g_file_get_contents (location, &contents, &size, &err);
|
||||||
if (err != NULL) {
|
if (err != NULL) {
|
||||||
GST_INFO ("Unable to read file %s : %s", location, err->message);
|
GST_INFO ("Unable to read file %s : %s", location, err->message);
|
||||||
|
g_timer_destroy (timer);
|
||||||
g_error_free (err);
|
g_error_free (err);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -935,7 +936,6 @@ gst_registry_binary_read_cache (GstRegistry * registry, const char *location)
|
||||||
|
|
||||||
g_timer_stop (timer);
|
g_timer_stop (timer);
|
||||||
seconds = g_timer_elapsed (timer, NULL);
|
seconds = g_timer_elapsed (timer, NULL);
|
||||||
g_timer_destroy (timer);
|
|
||||||
|
|
||||||
GST_INFO ("loaded %s in %lf seconds", location, seconds);
|
GST_INFO ("loaded %s in %lf seconds", location, seconds);
|
||||||
|
|
||||||
|
@ -943,6 +943,7 @@ gst_registry_binary_read_cache (GstRegistry * registry, const char *location)
|
||||||
/* TODO: once we re-use the pointers to registry contents return here */
|
/* TODO: once we re-use the pointers to registry contents return here */
|
||||||
|
|
||||||
Error:
|
Error:
|
||||||
|
g_timer_destroy (timer);
|
||||||
if (mapped) {
|
if (mapped) {
|
||||||
g_mapped_file_free (mapped);
|
g_mapped_file_free (mapped);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue