mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
format: Avoid some code duplication
We frequently need to free an idxset containing pa_format_infos, so define an internal free function that can be used directly with this (instead of defining it once-per-file).
This commit is contained in:
parent
13229fb39e
commit
e418e49ecb
4 changed files with 12 additions and 14 deletions
|
|
@ -66,6 +66,10 @@ void pa_format_info_free(pa_format_info *f) {
|
|||
pa_xfree(f);
|
||||
}
|
||||
|
||||
void pa_format_info_free2(pa_format_info *f, void *userdata) {
|
||||
pa_format_info_free(f);
|
||||
}
|
||||
|
||||
int pa_format_info_valid(pa_format_info *f) {
|
||||
return (f->encoding >= 0 && f->encoding < PA_ENCODING_MAX && f->plist != NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue