@Override public DecodedTrackHolder decodeTrack(MessageInput stream) throws IOException { DataInput input = stream.nextMessage(); if (input == null) { return null; } int version = (stream.getMessageFlags() & TRACK_INFO_VERSIONED) != 0 ? (input.readByte() & 0xFF) : 1; AudioTrackInfo trackInfo = new AudioTrackInfo(input.readUTF(), input.readUTF(), input.readLong(), input.readUTF(), input.readBoolean(), version >= 2 ? DataFormatTools.readNullableText(input) : null); AudioTrack track = decodeTrackDetails(trackInfo, input); long position = input.readLong(); if (track != null) { track.setPosition(position); } stream.skipRemainingBytes(); return new DecodedTrackHolder(track); }