aboutsummaryrefslogtreecommitdiffstats
path: root/src/filter/plugins/ConvertFilterPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-12 16:36:07 +0200
committerMax Kellermann <max@duempel.org>2014-08-12 16:36:07 +0200
commit56f61a6d59cfc6a97005d85599963cafdfdeaba8 (patch)
treec5d4c15e407b5ef6213cc82808af562e2bf85c6d /src/filter/plugins/ConvertFilterPlugin.cxx
parent4d5f610029f27f0947bd590b32dbd2179ab379e9 (diff)
downloadmpd-56f61a6d59cfc6a97005d85599963cafdfdeaba8.tar.gz
mpd-56f61a6d59cfc6a97005d85599963cafdfdeaba8.tar.xz
mpd-56f61a6d59cfc6a97005d85599963cafdfdeaba8.zip
PcmConvert: Convert() returns ConstBuffer
Diffstat (limited to 'src/filter/plugins/ConvertFilterPlugin.cxx')
-rw-r--r--src/filter/plugins/ConvertFilterPlugin.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/filter/plugins/ConvertFilterPlugin.cxx b/src/filter/plugins/ConvertFilterPlugin.cxx
index 27e6774f8..535330cfe 100644
--- a/src/filter/plugins/ConvertFilterPlugin.cxx
+++ b/src/filter/plugins/ConvertFilterPlugin.cxx
@@ -24,6 +24,7 @@
#include "filter/FilterRegistry.hxx"
#include "pcm/PcmConvert.hxx"
#include "util/Manual.hxx"
+#include "util/ConstBuffer.hxx"
#include "AudioFormat.hxx"
#include "poison.h"
@@ -130,8 +131,9 @@ ConvertFilter::FilterPCM(const void *src, size_t src_size,
return src;
}
- return state->Convert(src, src_size, dest_size_r,
- error);
+ auto result = state->Convert({src, src_size}, error);
+ *dest_size_r = result.size;
+ return result.data;
}
const struct filter_plugin convert_filter_plugin = {