From e418e49ecbd643f3cac87438d00baaf86275927c Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Wed, 2 Mar 2011 11:31:51 +0530 Subject: 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). --- src/pulse/format.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pulse/format.c') diff --git a/src/pulse/format.c b/src/pulse/format.c index af24eb2e..9bb76732 100644 --- a/src/pulse/format.c +++ b/src/pulse/format.c @@ -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); } -- cgit