summaryrefslogtreecommitdiffstats
path: root/src/pulse/format.c
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2011-03-02 11:31:51 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-05-02 11:54:48 +0530
commite418e49ecbd643f3cac87438d00baaf86275927c (patch)
tree53a5290e3bf85fb4201f470b3e84a4267399cb8c /src/pulse/format.c
parent13229fb39e7b8cff3f114c98f8236d9123442243 (diff)
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).
Diffstat (limited to 'src/pulse/format.c')
-rw-r--r--src/pulse/format.c4
1 files changed, 4 insertions, 0 deletions
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);
}