diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2022-12-08 00:25:38 +0000 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-01-24 15:56:56 +0100 |
commit | f8b71708714cae027df9dfbe0af64c02eafea99a (patch) | |
tree | ab4c4107f84fcbe6ba071469963a20bab6b7f700 | |
parent | 71346393e2b994fb3cd806453f308017a17fd174 (diff) | |
download | mpv-f8b71708714cae027df9dfbe0af64c02eafea99a.tar.bz2 mpv-f8b71708714cae027df9dfbe0af64c02eafea99a.tar.xz |
ao_pipewire: free properties on failure
-rw-r--r-- | audio/out/ao_pipewire.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c index bbdc1de3ca..9df14a4355 100644 --- a/audio/out/ao_pipewire.c +++ b/audio/out/ao_pipewire.c @@ -511,7 +511,7 @@ static int init(struct ao *ao) ); if (pipewire_init_boilerplate(ao) < 0) - goto error; + goto error_props; ao->device_buffer = p->options.buffer_msec * ao->samplerate / 1000; @@ -535,7 +535,7 @@ static int init(struct ao *ao) params[0] = spa_format_audio_raw_build(&b, SPA_PARAM_EnumFormat, &audio_info); if (!params[0]) - goto error; + goto error_props; if (af_fmt_is_planar(ao->format)) { ao->num_planes = ao->channels.num; @@ -575,6 +575,8 @@ static int init(struct ao *ao) return 0; +error_props: + pw_properties_free(props); error: uninit(ao); return -1; |