output/alsa: merge alsa_data_free() into destructor
This commit is contained in:
parent
a29c64b6c7
commit
766905ba9f
@ -111,13 +111,6 @@ alsa_data_new(void)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
alsa_data_free(struct alsa_data *ad)
|
|
||||||
{
|
|
||||||
g_free(ad->device);
|
|
||||||
g_free(ad);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
alsa_configure(struct alsa_data *ad, const struct config_param *param)
|
alsa_configure(struct alsa_data *ad, const struct config_param *param)
|
||||||
{
|
{
|
||||||
@ -166,7 +159,9 @@ alsa_finish(struct audio_output *ao)
|
|||||||
struct alsa_data *ad = (struct alsa_data *)ao;
|
struct alsa_data *ad = (struct alsa_data *)ao;
|
||||||
|
|
||||||
ao_base_finish(&ad->base);
|
ao_base_finish(&ad->base);
|
||||||
alsa_data_free(ad);
|
|
||||||
|
g_free(ad->device);
|
||||||
|
g_free(ad);
|
||||||
|
|
||||||
/* free libasound's config cache */
|
/* free libasound's config cache */
|
||||||
snd_config_update_free_global();
|
snd_config_update_free_global();
|
||||||
|
Loading…
Reference in New Issue
Block a user