Commit 1f9d9c31 authored by Max Kellermann's avatar Max Kellermann

Merge branch 'v0.18.x'

parents 74e95e88 94efeb28
...@@ -60,6 +60,7 @@ ver 0.18.12 (not yet released) ...@@ -60,6 +60,7 @@ ver 0.18.12 (not yet released)
- audiofile: improve responsiveness - audiofile: improve responsiveness
- audiofile: fix WAV stream playback - audiofile: fix WAV stream playback
- dsdiff, dsf: fix stream playback - dsdiff, dsf: fix stream playback
- dsdiff: fix metadata parser bug (uninitialized variables)
- faad: estimate song duration for remote files - faad: estimate song duration for remote files
- sndfile: improve responsiveness - sndfile: improve responsiveness
* randomize next song when enabling "random" mode while not playing * randomize next song when enabling "random" mode while not playing
......
...@@ -247,15 +247,17 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is, ...@@ -247,15 +247,17 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is,
if (!dsdiff_read_chunk_header(decoder, is, chunk_header)) if (!dsdiff_read_chunk_header(decoder, is, chunk_header))
return false; return false;
metadata->diar_offset = 0;
metadata->diti_offset = 0;
#ifdef HAVE_ID3TAG #ifdef HAVE_ID3TAG
metadata->id3_size = 0; metadata->id3_offset = 0;
#endif #endif
/* Now process all the remaining chunk headers in the stream /* Now process all the remaining chunk headers in the stream
and record their position and size */ and record their position and size */
const auto size = is.GetSize(); do {
while (is.GetOffset() < size) {
uint64_t chunk_size = chunk_header->GetSize(); uint64_t chunk_size = chunk_header->GetSize();
/* DIIN chunk, is directly followed by other chunks */ /* DIIN chunk, is directly followed by other chunks */
...@@ -281,16 +283,11 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is, ...@@ -281,16 +283,11 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is,
metadata->id3_size = chunk_size; metadata->id3_size = chunk_size;
} }
#endif #endif
if (chunk_size != 0) {
if (!dsdlib_skip(decoder, is, chunk_size))
break;
}
if (is.GetOffset() < size) { if (!dsdlib_skip(decoder, is, chunk_size))
if (!dsdiff_read_chunk_header(decoder, is, chunk_header)) break;
return false; } while (dsdiff_read_chunk_header(decoder, is, chunk_header));
}
}
/* done processing chunk headers, process tags if any */ /* done processing chunk headers, process tags if any */
#ifdef HAVE_ID3TAG #ifdef HAVE_ID3TAG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment