aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/FaadDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-09-22 08:18:58 +0200
committerMax Kellermann <max@duempel.org>2014-09-22 08:18:58 +0200
commit3ae0d6f4210e370225cf0b9177f6c16d84d9255b (patch)
tree946d5a451428d070b9be905f8e900def60e1f0a3 /src/decoder/plugins/FaadDecoderPlugin.cxx
parent13b66a77c73dbb5d00d439d42be82c004ac16ea1 (diff)
downloadmpd-3ae0d6f4210e370225cf0b9177f6c16d84d9255b.tar.gz
mpd-3ae0d6f4210e370225cf0b9177f6c16d84d9255b.tar.xz
mpd-3ae0d6f4210e370225cf0b9177f6c16d84d9255b.zip
DecoderBuffer: export the struct
Eliminates the functions _new() and _free().
Diffstat (limited to 'src/decoder/plugins/FaadDecoderPlugin.cxx')
-rw-r--r--src/decoder/plugins/FaadDecoderPlugin.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/decoder/plugins/FaadDecoderPlugin.cxx b/src/decoder/plugins/FaadDecoderPlugin.cxx
index d59309a3a..6a2744243 100644
--- a/src/decoder/plugins/FaadDecoderPlugin.cxx
+++ b/src/decoder/plugins/FaadDecoderPlugin.cxx
@@ -308,8 +308,8 @@ static std::pair<bool, SignedSongTime>
faad_get_file_time(InputStream &is)
{
DecoderBuffer *buffer =
- decoder_buffer_new(nullptr, is,
- FAAD_MIN_STREAMSIZE * MAX_CHANNELS);
+ new DecoderBuffer(nullptr, is,
+ FAAD_MIN_STREAMSIZE * MAX_CHANNELS);
auto duration = faad_song_duration(buffer, is);
bool recognized = !duration.IsNegative();
@@ -326,7 +326,7 @@ faad_get_file_time(InputStream &is)
NeAACDecClose(decoder);
}
- decoder_buffer_free(buffer);
+ delete buffer;
return std::make_pair(recognized, duration);
}
@@ -415,8 +415,8 @@ static void
faad_stream_decode(Decoder &mpd_decoder, InputStream &is)
{
DecoderBuffer *buffer =
- decoder_buffer_new(&mpd_decoder, is,
- FAAD_MIN_STREAMSIZE * MAX_CHANNELS);
+ new DecoderBuffer(&mpd_decoder, is,
+ FAAD_MIN_STREAMSIZE * MAX_CHANNELS);
/* create the libfaad decoder */
@@ -427,7 +427,7 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is)
/* cleanup */
NeAACDecClose(decoder);
- decoder_buffer_free(buffer);
+ delete buffer;
}
static bool