aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/DespotifyInputPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-30 20:11:57 +0200
committerMax Kellermann <max@duempel.org>2013-07-30 20:19:53 +0200
commit06f898cc1240a29b293de0e97ad95a4fdc971254 (patch)
tree001a6d3db039cdc03323f3bfddc13b94bde31ce4 /src/input/DespotifyInputPlugin.cxx
parent6a9ab8bc0e2f5d34803513bb2d94d041a607a58c (diff)
downloadmpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.gz
mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.xz
mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.zip
tag: convert to C++
Diffstat (limited to '')
-rw-r--r--src/input/DespotifyInputPlugin.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/input/DespotifyInputPlugin.cxx b/src/input/DespotifyInputPlugin.cxx
index 1e5a8c606..18e896608 100644
--- a/src/input/DespotifyInputPlugin.cxx
+++ b/src/input/DespotifyInputPlugin.cxx
@@ -23,7 +23,7 @@
#include "InputInternal.hxx"
#include "InputStream.hxx"
#include "InputPlugin.hxx"
-#include "tag.h"
+#include "Tag.hxx"
extern "C" {
#include <despotify.h>
@@ -42,7 +42,7 @@ struct DespotifyInputStream {
struct despotify_session *session;
struct ds_track *track;
- struct tag *tag;
+ Tag *tag;
struct ds_pcm_data pcm;
size_t len_available;
bool eof;
@@ -64,8 +64,7 @@ struct DespotifyInputStream {
}
~DespotifyInputStream() {
- if (tag != NULL)
- tag_free(tag);
+ delete tag;
despotify_free_track(track);
}
@@ -216,11 +215,11 @@ input_despotify_seek(G_GNUC_UNUSED struct input_stream *is,
return false;
}
-static struct tag *
+static Tag *
input_despotify_tag(struct input_stream *is)
{
DespotifyInputStream *ctx = (DespotifyInputStream *)is;
- struct tag *tag = ctx->tag;
+ Tag *tag = ctx->tag;
ctx->tag = NULL;