decoder/dsdiff: pass DecoderClient* to dsdiff_handle_native_tag()

This commit is contained in:
Max Kellermann 2019-06-06 12:43:20 +02:00
parent fad60f977e
commit 3b5a128097

View File

@ -185,17 +185,17 @@ dsdiff_read_prop(DecoderClient *client, InputStream &is,
} }
static void static void
dsdiff_handle_native_tag(InputStream &is, dsdiff_handle_native_tag(DecoderClient *client, InputStream &is,
TagHandler &handler, TagHandler &handler,
offset_type tagoffset, offset_type tagoffset,
TagType type) TagType type)
{ {
if (!dsdlib_skip_to(nullptr, is, tagoffset)) if (!dsdlib_skip_to(client, is, tagoffset))
return; return;
struct dsdiff_native_tag metatag; struct dsdiff_native_tag metatag;
if (!decoder_read_full(nullptr, is, &metatag, sizeof(metatag))) if (!decoder_read_full(client, is, &metatag, sizeof(metatag)))
return; return;
uint32_t length = FromBE32(metatag.size); uint32_t length = FromBE32(metatag.size);
@ -209,7 +209,7 @@ dsdiff_handle_native_tag(InputStream &is,
char *label; char *label;
label = string; label = string;
if (!decoder_read_full(nullptr, is, label, (size_t)length)) if (!decoder_read_full(client, is, label, (size_t)length))
return; return;
string[length] = '\0'; string[length] = '\0';
@ -292,11 +292,11 @@ dsdiff_read_metadata_extra(DecoderClient *client, InputStream &is,
#endif #endif
if (artist_offset != 0) if (artist_offset != 0)
dsdiff_handle_native_tag(is, handler, dsdiff_handle_native_tag(client, is, handler,
artist_offset, TAG_ARTIST); artist_offset, TAG_ARTIST);
if (title_offset != 0) if (title_offset != 0)
dsdiff_handle_native_tag(is, handler, dsdiff_handle_native_tag(client, is, handler,
title_offset, TAG_TITLE); title_offset, TAG_TITLE);
return true; return true;
} }