mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 13:25:56 +00:00
trace: use g_parse_debug_string instead of atoi
Make the GST_TRACE env variable take a comma separated list of strings describing the options to enable instead of a number.
This commit is contained in:
parent
be5d2987a8
commit
4f8474e113
1 changed files with 5 additions and 1 deletions
|
@ -63,7 +63,11 @@ _priv_gst_alloc_trace_initialize (void)
|
|||
|
||||
trace = g_getenv ("GST_TRACE");
|
||||
if (trace != NULL) {
|
||||
_gst_trace_flags = atoi (trace);
|
||||
const GDebugKey keys[] = {
|
||||
{"live", GST_ALLOC_TRACE_LIVE},
|
||||
{"mem-live", GST_ALLOC_TRACE_MEM_LIVE},
|
||||
};
|
||||
_gst_trace_flags = g_parse_debug_string (trace, keys, G_N_ELEMENTS (keys));
|
||||
atexit (_at_exit);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue