output/null: don't initialize the "timer" attribute in _init()
Unnecessary overhead.
This commit is contained in:
parent
aa4f45b9a5
commit
6584897b69
@ -45,7 +45,6 @@ null_init(const struct config_param *param, GError **error_r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
nd->sync = config_get_block_bool(param, "sync", true);
|
nd->sync = config_get_block_bool(param, "sync", true);
|
||||||
nd->timer = NULL;
|
|
||||||
|
|
||||||
return &nd->base;
|
return &nd->base;
|
||||||
}
|
}
|
||||||
@ -55,8 +54,6 @@ null_finish(struct audio_output *ao)
|
|||||||
{
|
{
|
||||||
struct null_data *nd = (struct null_data *)ao;
|
struct null_data *nd = (struct null_data *)ao;
|
||||||
|
|
||||||
assert(nd->timer == NULL);
|
|
||||||
|
|
||||||
ao_base_finish(&nd->base);
|
ao_base_finish(&nd->base);
|
||||||
g_free(nd);
|
g_free(nd);
|
||||||
}
|
}
|
||||||
@ -78,10 +75,8 @@ null_close(struct audio_output *ao)
|
|||||||
{
|
{
|
||||||
struct null_data *nd = (struct null_data *)ao;
|
struct null_data *nd = (struct null_data *)ao;
|
||||||
|
|
||||||
if (nd->timer != NULL) {
|
if (nd->sync)
|
||||||
timer_free(nd->timer);
|
timer_free(nd->timer);
|
||||||
nd->timer = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
|
Loading…
Reference in New Issue
Block a user