aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/OpusDecoderPlugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/OpusDecoderPlugin.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/decoder/OpusDecoderPlugin.cxx b/src/decoder/OpusDecoderPlugin.cxx
index 84467371c..148125347 100644
--- a/src/decoder/OpusDecoderPlugin.cxx
+++ b/src/decoder/OpusDecoderPlugin.cxx
@@ -36,6 +36,7 @@
#include <glib.h>
#include <stdio.h>
+#include <string.h>
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "opus"
@@ -221,16 +222,16 @@ MPDOpusDecoder::HandleBOS(const ogg_packet &packet)
inline enum decoder_command
MPDOpusDecoder::HandleTags(const ogg_packet &packet)
{
- struct tag *tag = tag_new();
+ Tag tag;
enum decoder_command cmd;
- if (ScanOpusTags(packet.packet, packet.bytes, &add_tag_handler, tag) &&
- !tag_is_empty(tag))
- cmd = decoder_tag(decoder, input_stream, tag);
+ if (ScanOpusTags(packet.packet, packet.bytes,
+ &add_tag_handler, &tag) &&
+ !tag.IsEmpty())
+ cmd = decoder_tag(decoder, input_stream, &tag);
else
cmd = decoder_get_command(decoder);
- tag_free(tag);
return cmd;
}