Skip to content

Commit e5a8ae7

Browse files
committed
Fixed double read on first chunk
1 parent f6191ff commit e5a8ae7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/src/main/java/xyz/gianlu/librespot/audio/cdn/CdnManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ private Streamer(@NotNull StreamId streamId, @NotNull SuperAudioFormat format, @
239239

240240
available = new boolean[chunks];
241241
requested = new boolean[chunks];
242-
243242
buffer = new byte[chunks][];
243+
internalStream = new InternalStream(session.configuration().retryOnChunkError);
244244

245-
this.internalStream = new InternalStream(session.configuration().retryOnChunkError);
245+
requested[0] = true;
246246
writeChunk(firstChunk, 0, fromCache);
247247
}
248248

0 commit comments

Comments
 (0)