diff options
author | Max Kellermann <max@duempel.org> | 2014-07-12 20:51:22 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-07-12 20:51:22 +0200 |
commit | 1f9d9c3176802a600ca587794775c8d0f7aa57de (patch) | |
tree | a391a90ffdb66965c1cb239cc41265940a30b8b8 /src/decoder | |
parent | 74e95e88d8507b3e133a634abc12b5efeceba866 (diff) | |
parent | 94efeb284582643cfdbca248c2f4e4647be09f63 (diff) | |
download | mpd-1f9d9c3176802a600ca587794775c8d0f7aa57de.tar.gz mpd-1f9d9c3176802a600ca587794775c8d0f7aa57de.tar.xz mpd-1f9d9c3176802a600ca587794775c8d0f7aa57de.zip |
Merge branch 'v0.18.x'
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/plugins/DsdiffDecoderPlugin.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/decoder/plugins/DsdiffDecoderPlugin.cxx b/src/decoder/plugins/DsdiffDecoderPlugin.cxx index d6f402911..1a4764aeb 100644 --- a/src/decoder/plugins/DsdiffDecoderPlugin.cxx +++ b/src/decoder/plugins/DsdiffDecoderPlugin.cxx @@ -247,15 +247,17 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is, if (!dsdiff_read_chunk_header(decoder, is, chunk_header)) return false; + metadata->diar_offset = 0; + metadata->diti_offset = 0; + #ifdef HAVE_ID3TAG - metadata->id3_size = 0; + metadata->id3_offset = 0; #endif /* Now process all the remaining chunk headers in the stream and record their position and size */ - const auto size = is.GetSize(); - while (is.GetOffset() < size) { + do { uint64_t chunk_size = chunk_header->GetSize(); /* DIIN chunk, is directly followed by other chunks */ @@ -281,16 +283,11 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is, metadata->id3_size = chunk_size; } #endif - if (chunk_size != 0) { - if (!dsdlib_skip(decoder, is, chunk_size)) - break; - } - if (is.GetOffset() < size) { - if (!dsdiff_read_chunk_header(decoder, is, chunk_header)) - return false; - } - } + if (!dsdlib_skip(decoder, is, chunk_size)) + break; + } while (dsdiff_read_chunk_header(decoder, is, chunk_header)); + /* done processing chunk headers, process tags if any */ #ifdef HAVE_ID3TAG |