diff options
author | Max Kellermann <max@duempel.org> | 2013-07-30 20:11:57 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-07-30 20:19:53 +0200 |
commit | 06f898cc1240a29b293de0e97ad95a4fdc971254 (patch) | |
tree | 001a6d3db039cdc03323f3bfddc13b94bde31ce4 /src/decoder/OpusDecoderPlugin.cxx | |
parent | 6a9ab8bc0e2f5d34803513bb2d94d041a607a58c (diff) | |
download | mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.gz mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.xz mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.zip |
tag: convert to C++
Diffstat (limited to 'src/decoder/OpusDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/OpusDecoderPlugin.cxx | 11 |
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; } |